Archived
1
0

First commit

This commit is contained in:
Sean Edmunds
2021-12-13 17:00:40 -06:00
commit 0584430b5c
36617 changed files with 4676695 additions and 0 deletions

20
node_modules/worker-rpc/lib/RpcProviderInterface.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { EventInterface } from 'microevent.ts';
interface RpcProviderInterface {
dispatch(message: any): void;
rpc<T, U>(id: string, payload?: T, transfer?: Array<any>): Promise<U>;
signal<T>(id: string, payload?: T, transfer?: Array<any>): this;
registerRpcHandler<T, U>(id: string, handler: RpcProviderInterface.RpcHandler<T, U>): this;
registerSignalHandler<T>(id: string, handler: RpcProviderInterface.SignalHandler<T>): this;
deregisterRpcHandler<T, U>(id: string, handler: RpcProviderInterface.RpcHandler<T, U>): this;
deregisterSignalHandler<T>(id: string, handler: RpcProviderInterface.SignalHandler<T>): this;
error: EventInterface<Error>;
}
declare module RpcProviderInterface {
interface RpcHandler<T, U> {
(payload?: T): Promise<U> | U;
}
interface SignalHandler<T> {
(payload?: T): void;
}
}
export default RpcProviderInterface;