@grpc.ts/fastify-server
Advanced tools
Comparing version
@@ -6,3 +6,7 @@ import type { FastifyPluginAsync } from 'fastify'; | ||
export default _default; | ||
import type { TGetServerFunc } from './interface'; | ||
import type { Server } from '@grpc.ts/core/node_modules/@grpc/grpc-js'; | ||
import type { | ||
TUnaryHandlerFunc, | ||
IAddUnaryHandlerOptionsProps, | ||
} from '@grpc.ts/core'; | ||
@@ -12,5 +16,13 @@ declare module 'fastify' { | ||
grpcServer: { | ||
getServer: TGetServerFunc; | ||
getServer: (serverName?: string) => { | ||
server: Server; | ||
addUnaryHandler: <TRequest = unknown>( | ||
serviceName: string, | ||
rpcName: string, | ||
impl: TUnaryHandlerFunc<TRequest>, | ||
options?: IAddUnaryHandlerOptionsProps, | ||
) => void; | ||
}; | ||
}; | ||
} | ||
} |
import type { IServerWrapperProps } from '@grpc.ts/core'; | ||
export type TGetServerFunc = (serverName?: string) => IServerWrapperProps; | ||
export type TGetServerFunc<TRequest = unknown> = (serverName?: string) => IServerWrapperProps<TRequest>; |
{ | ||
"name": "@grpc.ts/fastify-server", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"license": "MIT", | ||
@@ -37,3 +37,3 @@ "directories": { | ||
"fastify-plugin": "^4.5.0", | ||
"@grpc.ts/core": "1.1.0" | ||
"@grpc.ts/core": "1.1.1" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
9296
4.56%150
8.7%+ Added
- Removed
Updated