@grpc.ts/core
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -9,2 +9,2 @@ export { createSecureContext } from 'tls'; | ||
export * from './utils'; | ||
export type { IClientProps, IServerProps, IServerWrapperProps, TAddUnaryHandlerFunc, IAddUnaryHandlerOptionsProps, } from './interface'; | ||
export type { IClientProps, IServerProps, TUnaryHandlerFunc, IServerWrapperProps, TAddUnaryHandlerFunc, IAddUnaryHandlerOptionsProps, } from './interface'; |
@@ -58,7 +58,7 @@ import type { Options } from '@grpc/proto-loader'; | ||
} | ||
type TUnaryHandlerFunc<TRequest = unknown, TResponse = unknown> = (request: TRequest, metadata: Metadata, call: ServerUnaryCall<TRequest, TResponse>) => TResponse; | ||
export type TAddUnaryHandlerFunc = (serviceName: string, rpcName: string, impl: TUnaryHandlerFunc, options?: IAddUnaryHandlerOptionsProps) => void; | ||
export interface IServerWrapperProps { | ||
export type TUnaryHandlerFunc<TRequest = unknown, TResponse = unknown> = (request: TRequest, metadata: Metadata, call: ServerUnaryCall<TRequest, TResponse>) => TResponse; | ||
export type TAddUnaryHandlerFunc<TRequest = unknown> = (serviceName: string, rpcName: string, impl: TUnaryHandlerFunc<TRequest>, options?: IAddUnaryHandlerOptionsProps) => void; | ||
export interface IServerWrapperProps<TRequest = unknown> { | ||
server: Server; | ||
addUnaryHandler: TAddUnaryHandlerFunc; | ||
addUnaryHandler: TAddUnaryHandlerFunc<TRequest>; | ||
} | ||
@@ -65,0 +65,0 @@ interface IGetServiceOptionsProps { |
import { Metadata, type MetadataValue } from '@grpc/grpc-js'; | ||
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; | ||
import type { GrpcTimestamp } from './dataType'; | ||
import { GrpcTimestamp } from './dataType'; | ||
export declare function createMetadata(params: Record<string, MetadataValue>): Metadata; | ||
export declare function dateToGrpcTimestamp(data: Date | string | number): Timestamp.AsObject; | ||
export declare function dateToGrpcTimestamp(data: Date | string | number): GrpcTimestamp; | ||
export declare function grpcTimestampToDate(data: GrpcTimestamp): Date; |
{ | ||
"name": "@grpc.ts/core", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42358
1030