@pbkit/runtime
Advanced tools
Comparing version 0.0.20 to 0.0.21
{ | ||
"name": "@pbkit/runtime", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"author": "JongChan Choi <jong@chan.moe>", | ||
@@ -5,0 +5,0 @@ "license": "(MIT OR Apache-2.0)", |
@@ -41,2 +41,7 @@ export declare type Method<TMetadata = any, THeader = any, TTrailer = any, TServiceName extends string = string, TMethodName extends string = string, TRequestStream extends boolean = boolean, TResponseStream extends boolean = boolean, TReq = any, TRes = any> = [ | ||
export declare function getMethodImpl<TReq, TRes, TMetadata, THeader, TTrailer>(handler: MethodImplHandler<TReq, TRes, TMetadata, THeader, TTrailer>): MethodImpl<TReq, TRes, TMetadata, THeader, TTrailer>; | ||
export declare function createServerImplBuilder<TMetadata, THeader, TTrailer>(): { | ||
register<TReq, TRes>(methodDescriptor: MethodDescriptor<TReq, TRes, string, string, boolean, boolean>, handler: MethodImplHandler<TReq, TRes, TMetadata, THeader, TTrailer>): void; | ||
finish: () => void; | ||
drain: () => AsyncGenerator<Method<TMetadata, THeader, TTrailer, string, string, boolean, boolean, any, any>, any, unknown>; | ||
}; | ||
export {}; |
13
rpc.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMethodImpl = void 0; | ||
exports.createServerImplBuilder = exports.getMethodImpl = void 0; | ||
const event_buffer_1 = require("./async/event-buffer"); | ||
@@ -25,1 +25,12 @@ const observer_1 = require("./async/observer"); | ||
exports.getMethodImpl = getMethodImpl; | ||
function createServerImplBuilder() { | ||
const buffer = event_buffer_1.createEventBuffer(); | ||
return { | ||
register(methodDescriptor, handler) { | ||
buffer.push([methodDescriptor, getMethodImpl(handler)]); | ||
}, | ||
finish: buffer.finish, | ||
drain: buffer.drain, | ||
}; | ||
} | ||
exports.createServerImplBuilder = createServerImplBuilder; |
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
40006
1105
1515