grpc-js: slight cleanup of server imports/exports

This commit removes some unnecessary imports and exports
from the server code.
This commit is contained in:
cjihrig 2019-05-17 12:14:27 -04:00
parent 212439eb83
commit a7372e2b1c
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
3 changed files with 4 additions and 8 deletions

View File

@ -26,10 +26,6 @@ import {Deserialize, Serialize} from './make-client';
import {Metadata} from './metadata'; import {Metadata} from './metadata';
import {StreamDecoder} from './stream-decoder'; import {StreamDecoder} from './stream-decoder';
function noop(): void {}
export type PartialServiceError = Partial<ServiceError>;
type DeadlineUnitIndexSignature = { type DeadlineUnitIndexSignature = {
[name: string]: number [name: string]: number
}; };

View File

@ -20,18 +20,18 @@ import {AddressInfo, ListenOptions} from 'net';
import {URL} from 'url'; import {URL} from 'url';
import {ServiceError} from './call'; import {ServiceError} from './call';
import {StatusObject} from './call-stream';
import {Status} from './constants'; import {Status} from './constants';
import {Deserialize, Serialize, ServiceDefinition} from './make-client'; import {Deserialize, Serialize, ServiceDefinition} from './make-client';
import {Metadata} from './metadata'; import {Metadata} from './metadata';
import {BidiStreamingHandler, ClientStreamingHandler, HandleCall, Handler, HandlerType, Http2ServerCallStream, PartialServiceError, sendUnaryData, ServerDuplexStream, ServerDuplexStreamImpl, ServerReadableStream, ServerReadableStreamImpl, ServerStreamingHandler, ServerUnaryCall, ServerUnaryCallImpl, ServerWritableStream, ServerWritableStreamImpl, UnaryHandler} from './server-call'; import {BidiStreamingHandler, ClientStreamingHandler, HandleCall, Handler, HandlerType, Http2ServerCallStream, sendUnaryData, ServerDuplexStream, ServerDuplexStreamImpl, ServerReadableStream, ServerReadableStreamImpl, ServerStreamingHandler, ServerUnaryCall, ServerUnaryCallImpl, ServerWritableStream, ServerWritableStreamImpl, UnaryHandler} from './server-call';
import {ServerCredentials} from './server-credentials'; import {ServerCredentials} from './server-credentials';
function noop(): void {} function noop(): void {}
const unimplementedStatusResponse: PartialServiceError = { const unimplementedStatusResponse: Partial<ServiceError> = {
code: Status.UNIMPLEMENTED, code: Status.UNIMPLEMENTED,
details: 'The server does not implement this method', details: 'The server does not implement this method',
metadata: new Metadata()
}; };
// tslint:disable:no-any // tslint:disable:no-any

View File

@ -26,7 +26,7 @@ import {ServerCredentials} from '../src';
import {ServiceError} from '../src/call'; import {ServiceError} from '../src/call';
import {ServiceClient, ServiceClientConstructor} from '../src/make-client'; import {ServiceClient, ServiceClientConstructor} from '../src/make-client';
import {Server} from '../src/server'; import {Server} from '../src/server';
import {sendUnaryData, ServerDuplexStream, ServerReadableStream, ServerUnaryCall, ServerWritableStream} from '../src/server-call'; import {sendUnaryData, ServerUnaryCall} from '../src/server-call';
import {loadProtoFile} from './common'; import {loadProtoFile} from './common';