bump
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ export class RPCServer<
|
||||
if(badRPC = exporters.flatMap(ex => ex.exportRPCs()).find(rpc => !rpc.name))
|
||||
throw new Error(`
|
||||
RPC did not provide a name.
|
||||
\nUse funtion name(..){ .. } syntax instead.
|
||||
\nUse 'funtion name(..){ .. }' syntax instead.
|
||||
\n
|
||||
\n<------------OFFENDING RPC:
|
||||
\n`+badRPC.toString()+`
|
||||
|
||||
+4
-4
@@ -48,7 +48,7 @@ export type BaseInfo = {
|
||||
|
||||
export type HookInfo<T = {}> = BaseInfo & {
|
||||
type: 'Hook',
|
||||
generator: (socket) => HookFunction<T>
|
||||
generator: (socket?:I.Socket) => HookFunction<T>
|
||||
}
|
||||
|
||||
export type CallInfo = BaseInfo & {
|
||||
@@ -61,6 +61,6 @@ export type ExtendedRpcInfo = RpcInfo & { uniqueName: string }
|
||||
|
||||
export type OnFunction = (type: 'error' | 'close', f: (e?:any)=>void) => I.Socket
|
||||
export type HookCloseFunction<T = {}> = (res:SubscriptionResponse<T>, rpc:HookRPC<T>) => any
|
||||
export type HookFunction<T = {}> = (...args:[any, ...any[]]) => Promise<SubscriptionResponse<T> | ErrorResponse>
|
||||
export type AsyncFunction = (...args:any[]) => Promise<any>
|
||||
export type CallbackFunction = (...args:any[]) => void
|
||||
export type HookFunction<T = {}> = (...args:any) => Promise<SubscriptionResponse<T> | ErrorResponse>
|
||||
export type AsyncFunction = (...args:any) => Promise<any>
|
||||
export type CallbackFunction = (...args:any) => void
|
||||
+1
-1
@@ -28,7 +28,7 @@ export const rpcToRpcinfo = <SubResT = {}>(rpc : T.RPC<SubResT>, owner: T.Owner)
|
||||
case "function":
|
||||
if(!rpc.name) throw new Error(`
|
||||
RPC did not provide a name.
|
||||
\nUse funtion name(..){ .. } syntax instead.
|
||||
\nUse 'funtion name(..){ .. }' syntax instead.
|
||||
\n
|
||||
\n<------------OFFENDING RPC:
|
||||
\n`+rpc.toString()+`
|
||||
|
||||
Reference in New Issue
Block a user