Comparing version 0.0.1 to 0.0.2
declare type ArgumentsType<T> = T extends (...args: infer A) => any ? A : never; | ||
declare type ReturnType<T> = T extends (...args: any) => infer R ? R : never; | ||
interface BirpcOptions<Functions> { | ||
interface BirpcOptions<Local, Remote> { | ||
/** | ||
* Local functions implementation. | ||
*/ | ||
functions: Functions; | ||
functions: Local; | ||
/** | ||
* Names of remote functions that do not need response. | ||
*/ | ||
eventNames?: (keyof Remote)[]; | ||
/** | ||
* Function to post raw message | ||
@@ -37,3 +41,3 @@ */ | ||
*/ | ||
noReply(...args: ArgumentsType<T>): void; | ||
asEvent(...args: ArgumentsType<T>): void; | ||
}; | ||
@@ -43,4 +47,4 @@ declare type BirpcReturn<RemoteFunctions> = { | ||
}; | ||
declare function createBirpc<LocalFunctions = {}, RemoteFunctions = {}>({ functions, post, on, serialize, deserialize, }: BirpcOptions<LocalFunctions>): BirpcReturn<RemoteFunctions>; | ||
declare function createBirpc<LocalFunctions = {}, RemoteFunctions = {}>({ functions, post, on, eventNames, serialize, deserialize, }: BirpcOptions<LocalFunctions, RemoteFunctions>): BirpcReturn<RemoteFunctions>; | ||
export { ArgumentsType, BirpcFn, BirpcOptions, BirpcReturn, ReturnType, createBirpc }; |
{ | ||
"name": "birpc", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Message based Two-way remote procedure call", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
7812
171