Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "arpc", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "a node RPC library base on socket.io", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/Anillc/arpc.git", |
@@ -1,14 +0,12 @@ | ||
interface TheObject { | ||
[name: string]: AObject | ||
(...args: any[]): AObject | ||
} | ||
type AObject = TheObject & Promise<string | number | boolean> | ||
type Socket = import('socket.io').Socket | import('socket.io-client').Socket | ||
type RemoteObject = { | ||
[name: string]: RemoteObject | ||
(...args: any[]): RemoteObject | ||
} & Promise<string | number | boolean> | ||
declare class RPC { | ||
services: Map<string, [any, (obj: AObject) => undefined, (conn: Socket, reason: string) => undefined]> | ||
services: Map<string, [any, (obj: RemoteObject) => undefined, (conn: Socket, reason: string) => undefined]> | ||
connected(conn: Socket, name?: string): undefined | ||
createService(name: string, obj: any, onConnect?: (obj: AObject) => undefined, onDisconnect?: (conn: Socket, reason: string) => undefined): undefined | ||
getServer(obj?: any): AObject | ||
createService(name: string, obj: any, onConnect?: (obj: RemoteObject) => undefined, onDisconnect?: (conn: Socket, reason: string) => undefined): undefined | ||
getServer(obj?: any): RemoteObject | ||
} | ||
@@ -21,4 +19,4 @@ | ||
declare module 'arpc/client' { | ||
function client(socket: Socket, name: string, obj?: any, path?: string): AObject | ||
function client(url: string, name: string, obj?: any, path?: string): AObject | ||
function client(socket: Socket, name: string, obj?: any, path?: string): RemoteObject | ||
function client(url: string, name: string, obj?: any, path?: string): RemoteObject | ||
export = client | ||
@@ -25,0 +23,0 @@ } |
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
4896
23
23