@remote-ui/rpc
Advanced tools
Comparing version
@@ -7,3 +7,3 @@ export { createEndpoint } from './endpoint'; | ||
export type { Retainer, MemoryManageable } from './memory'; | ||
export type { FunctionStrategy, FunctionStrategyOptions, RemoteCallable, SafeRpcArgument, MessageEndpoint, } from './types'; | ||
export type { FunctionStrategy, FunctionStrategyOptions, RemoteCallable, SafeRpcArgument, MessageEndpoint, MaybePromise, } from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -11,2 +11,3 @@ export interface MessageEndpoint { | ||
declare type RemoteCallableField<T> = T extends (...args: infer Args) => infer TypeReturned ? (...args: Args) => AlwaysAsync<TypeReturned> : never; | ||
export declare type MaybePromise<T> = T extends Promise<any> ? T : T | Promise<T>; | ||
declare type AlwaysAsync<T> = T extends Promise<any> ? T : T extends infer U | Promise<infer U> ? Promise<U> : T extends (...args: infer Args) => infer TypeReturned ? (...args: Args) => AlwaysAsync<TypeReturned> : T extends (infer ArrayElement)[] ? AlwaysAsync<ArrayElement>[] : T extends readonly (infer ArrayElement)[] ? readonly AlwaysAsync<ArrayElement>[] : T extends object ? { | ||
@@ -13,0 +14,0 @@ [K in keyof T]: AlwaysAsync<T[K]>; |
{ | ||
"name": "@remote-ui/rpc", | ||
"description": "An RPC library with strong support for simulating the transfer of functions via postMessage", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
@@ -23,2 +23,3 @@ export {createEndpoint} from './endpoint'; | ||
MessageEndpoint, | ||
MaybePromise, | ||
} from './types'; |
@@ -22,2 +22,4 @@ export interface MessageEndpoint { | ||
export type MaybePromise<T> = T extends Promise<any> ? T : T | Promise<T>; | ||
type AlwaysAsync<T> = T extends Promise<any> | ||
@@ -24,0 +26,0 @@ ? T |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
491675
11.95%109
11.22%5725
22.3%0
-100%