mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1343 from Patrick-Remy/patch/grpc-native-typescript-definition-complience
grpc-js: adjust ts definitions to equal native-core
This commit is contained in:
commit
9485062a31
|
|
@ -35,6 +35,7 @@ import {
|
|||
Deserialize,
|
||||
loadPackageDefinition,
|
||||
makeClientConstructor,
|
||||
MethodDefinition,
|
||||
Serialize,
|
||||
ServiceDefinition,
|
||||
} from './make-client';
|
||||
|
|
@ -230,6 +231,7 @@ export {
|
|||
ClientWritableStream,
|
||||
ClientDuplexStream,
|
||||
CallOptions,
|
||||
MethodDefinition,
|
||||
StatusObject,
|
||||
ServiceError,
|
||||
ServerUnaryCall,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
import { ChannelCredentials } from './channel-credentials';
|
||||
import { ChannelOptions } from './channel-options';
|
||||
import { Client } from './client';
|
||||
import { UntypedServiceImplementation } from './server';
|
||||
|
||||
export interface Serialize<T> {
|
||||
(value: T): Buffer;
|
||||
|
|
@ -49,9 +50,9 @@ export interface MethodDefinition<RequestType, ResponseType>
|
|||
extends ClientMethodDefinition<RequestType, ResponseType>,
|
||||
ServerMethodDefinition<RequestType, ResponseType> {}
|
||||
|
||||
export interface ServiceDefinition {
|
||||
export type ServiceDefinition<ImplementationType = UntypedServiceImplementation> = {
|
||||
// tslint:disable-next-line no-any
|
||||
[index: string]: MethodDefinition<any, any>;
|
||||
readonly [index in keyof ImplementationType]: MethodDefinition<any, any>;
|
||||
}
|
||||
|
||||
export interface ProtobufTypeDefinition {
|
||||
|
|
|
|||
Loading…
Reference in New Issue