UNPKG

@tgrospic/rnode-grpc-js

Version:
50 lines (49 loc) 1.49 kB
export interface Options { /** * Library with gRPC protocol implementation. * * - '@grpc/grpc-js' for nodejs or 'grpc-web' in the browser */ readonly grpcLib: any; /** * Custom options for gRPC clients * * - **grpc-js** : https://github.com/grpc/grpc-node/blob/b05caec/packages/grpc-js/src/client.ts#L67 * - `credentials` can be supplied as part of `clientOptions` for `grpc-js` * - **grpc-web**: https://github.com/grpc/grpc-web/blob/8b501a96f/javascript/net/grpc/web/grpcwebclientbase.js#L45 */ readonly clientOptions?: any; /** * RNode host (gRPC method prefix). */ readonly host: string; /** * Generated JSON schema (default in _rnode-grpc-gen/js/rnode-api-schema.json_). */ readonly protoSchema: Object; } /** * Represents direct and easy access to protobuf serializer. */ export interface BinaryOp<T> { /** * Serializes plain JS object with `google-protobuf` serializer. */ serialize(_: T): Uint8Array; /** * Deserializes bytes to plain JS object with `google-protobuf` deserializer. */ deserialize(_: Uint8Array): T; /** * Creates underlying message object generated by `protoc`. * https://github.com/protocolbuffers/protobuf/tree/master/js#api */ create(opt_data?: any[]): any; } /** * Nested protobuf message definition (used in Var type). */ export interface WildcardMsg { } export interface Unit { }