mirror of https://github.com/grpc/grpc-node.git
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:
parent
212439eb83
commit
a7372e2b1c
|
@ -26,10 +26,6 @@ import {Deserialize, Serialize} from './make-client';
|
|||
import {Metadata} from './metadata';
|
||||
import {StreamDecoder} from './stream-decoder';
|
||||
|
||||
function noop(): void {}
|
||||
|
||||
export type PartialServiceError = Partial<ServiceError>;
|
||||
|
||||
type DeadlineUnitIndexSignature = {
|
||||
[name: string]: number
|
||||
};
|
||||
|
|
|
@ -20,18 +20,18 @@ import {AddressInfo, ListenOptions} from 'net';
|
|||
import {URL} from 'url';
|
||||
|
||||
import {ServiceError} from './call';
|
||||
import {StatusObject} from './call-stream';
|
||||
import {Status} from './constants';
|
||||
import {Deserialize, Serialize, ServiceDefinition} from './make-client';
|
||||
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';
|
||||
|
||||
function noop(): void {}
|
||||
|
||||
const unimplementedStatusResponse: PartialServiceError = {
|
||||
const unimplementedStatusResponse: Partial<ServiceError> = {
|
||||
code: Status.UNIMPLEMENTED,
|
||||
details: 'The server does not implement this method',
|
||||
metadata: new Metadata()
|
||||
};
|
||||
|
||||
// tslint:disable:no-any
|
||||
|
|
|
@ -26,7 +26,7 @@ import {ServerCredentials} from '../src';
|
|||
import {ServiceError} from '../src/call';
|
||||
import {ServiceClient, ServiceClientConstructor} from '../src/make-client';
|
||||
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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue