New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@remote-ui/rpc

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remote-ui/rpc - npm Package Compare versions

Comparing version

to
1.4.3

2

build/ts/endpoint.d.ts

@@ -8,3 +8,3 @@ import type { MessageEndpoint, RemoteCallable, EncodingStrategy, EncodingStrategyApi } from './types';

export declare const FUNCTION_RESULT = 6;
declare type AnyFunction = (...args: any[]) => any;
type AnyFunction = (...args: any[]) => any;
export interface CreateEndpointOptions<T = unknown> {

@@ -11,0 +11,0 @@ uuid?(): string;

@@ -7,11 +7,11 @@ export interface MessageEndpoint {

}
export declare type RemoteCallable<T> = {
export type RemoteCallable<T> = {
[K in keyof T]: RemoteCallableField<T[K]>;
};
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 ReadonlyArray<infer ArrayElement> ? ReadonlyArray<AlwaysAsync<ArrayElement>> : T extends object ? {
type RemoteCallableField<T> = T extends (...args: infer Args) => infer TypeReturned ? (...args: Args) => AlwaysAsync<TypeReturned> : never;
export type MaybePromise<T> = T extends Promise<any> ? T : T | Promise<T>;
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 ReadonlyArray<infer ArrayElement> ? ReadonlyArray<AlwaysAsync<ArrayElement>> : T extends object ? {
[K in keyof T]: AlwaysAsync<T[K]>;
} : T;
export declare type SafeRpcArgument<T> = T extends (...args: infer Args) => infer TypeReturned ? TypeReturned extends Promise<any> ? (...args: Args) => TypeReturned : (...args: Args) => TypeReturned | Promise<TypeReturned> : T extends (infer ArrayElement)[] ? SafeRpcArgument<ArrayElement>[] : T extends ReadonlyArray<infer ArrayElement> ? ReadonlyArray<SafeRpcArgument<ArrayElement>> : T extends object ? {
export type SafeRpcArgument<T> = T extends (...args: infer Args) => infer TypeReturned ? TypeReturned extends Promise<any> ? (...args: Args) => TypeReturned : (...args: Args) => TypeReturned | Promise<TypeReturned> : T extends (infer ArrayElement)[] ? SafeRpcArgument<ArrayElement>[] : T extends ReadonlyArray<infer ArrayElement> ? ReadonlyArray<SafeRpcArgument<ArrayElement>> : T extends object ? {
[K in keyof T]: SafeRpcArgument<T[K]>;

@@ -18,0 +18,0 @@ } : T;

# Changelog
## 1.4.3
### Patch Changes
- [#223](https://github.com/Shopify/remote-ui/pull/223) [`6c7f5f4`](https://github.com/Shopify/remote-ui/commit/6c7f5f44314447a436c8277f2d23e5ba82fb5c3e) Thanks [@lemonmade](https://github.com/lemonmade)! - Fix TypeScript types for exports consumers
## 1.4.2

@@ -4,0 +10,0 @@

{
"name": "@remote-ui/rpc",
"description": "An RPC library with strong support for simulating the transfer of functions via postMessage",
"version": "1.4.2",
"version": "1.4.3",
"publishConfig": {

@@ -15,7 +15,7 @@ "access": "public"

".": {
"types": "./build/ts/index.d.ts",
"esnext": "./index.esnext",
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
}
},

@@ -22,0 +22,0 @@ "sideEffects": false,

@@ -346,3 +346,3 @@ # `@remote-ui/rpc`

const channel = new MessageChannel();
const endpoint = createEndpoint(fromWebWorker(channel.port2));
const endpoint = createEndpoint(fromMessagePort(channel.port2));
```

@@ -349,0 +349,0 @@

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