capnweb 0.0.0-3d17ba1 → 0.0.0-409821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -21,12 +21,12 @@ interface RpcTargetBranded {
21
21
  // `any` into inference.
22
22
  type Stubable = RpcTargetBranded | ((...args: never[]) => unknown);
23
23
  type IsUnknown<T> = unknown extends T ? ([T] extends [unknown] ? true : false) : false; // Types that can be passed over RPC
24
- // The reason for using a generic type here is to build a serializable subset of structured
25
- // cloneable composite types. This allows types defined with the "interface" keyword to pass the
24
+ // The reason for using a generic type here is to build the serializable subset of RPC-compatible
25
+ // composite types. This allows types defined with the "interface" keyword to pass the
26
26
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
27
27
  type RpcCompatible<T> = // Allow `unknown` as a leaf so records/interfaces with `unknown` fields remain compatible.
28
- (IsUnknown<T> extends true ? unknown : never) // Structured cloneables
29
- | BaseType // Structured cloneable composites
28
+ (IsUnknown<T> extends true ? unknown : never) // RPC-compatible base values
29
+ | BaseType // RPC-compatible composites
30
30
  | Map<T extends Map<infer U, unknown> ? RpcCompatible<U> : never, T extends Map<unknown, infer U> ? RpcCompatible<U> : never> | Set<T extends Set<infer U> ? RpcCompatible<U> : never> | Array<T extends Array<infer U> ? RpcCompatible<U> : never> | ReadonlyArray<T extends ReadonlyArray<infer U> ? RpcCompatible<U> : never> | { [K in keyof T as K extends string | number ? K : never]: RpcCompatible<T[K]> } | Promise<T extends Promise<infer U> ? RpcCompatible<U> : never> // Special types
31
31
  | Stub<Stubable> // Serialized as stubs, see `Stubify`
32
32
  | Stubable;
package/dist/index.d.ts CHANGED
@@ -21,12 +21,12 @@ interface RpcTargetBranded {
21
21
  // `any` into inference.
22
22
  type Stubable = RpcTargetBranded | ((...args: never[]) => unknown);
23
23
  type IsUnknown<T> = unknown extends T ? ([T] extends [unknown] ? true : false) : false; // Types that can be passed over RPC
24
- // The reason for using a generic type here is to build a serializable subset of structured
25
- // cloneable composite types. This allows types defined with the "interface" keyword to pass the
24
+ // The reason for using a generic type here is to build the serializable subset of RPC-compatible
25
+ // composite types. This allows types defined with the "interface" keyword to pass the
26
26
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
27
27
  type RpcCompatible<T> = // Allow `unknown` as a leaf so records/interfaces with `unknown` fields remain compatible.
28
- (IsUnknown<T> extends true ? unknown : never) // Structured cloneables
29
- | BaseType // Structured cloneable composites
28
+ (IsUnknown<T> extends true ? unknown : never) // RPC-compatible base values
29
+ | BaseType // RPC-compatible composites
30
30
  | Map<T extends Map<infer U, unknown> ? RpcCompatible<U> : never, T extends Map<unknown, infer U> ? RpcCompatible<U> : never> | Set<T extends Set<infer U> ? RpcCompatible<U> : never> | Array<T extends Array<infer U> ? RpcCompatible<U> : never> | ReadonlyArray<T extends ReadonlyArray<infer U> ? RpcCompatible<U> : never> | { [K in keyof T as K extends string | number ? K : never]: RpcCompatible<T[K]> } | Promise<T extends Promise<infer U> ? RpcCompatible<U> : never> // Special types
31
31
  | Stub<Stubable> // Serialized as stubs, see `Stubify`
32
32
  | Stubable;