@vastblast/capnweb 0.5.0 → 0.5.1
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 +5 -3
- package/dist/index.d.ts +5 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -70,9 +70,11 @@ interface StubBase<T = unknown> extends Disposable {
|
|
|
70
70
|
// The reason for using a generic type here is to build a serializable subset of structured
|
|
71
71
|
// cloneable composite types. This allows types defined with the "interface" keyword to pass the
|
|
72
72
|
// serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
|
|
73
|
-
type RpcCompatible<T> =
|
|
74
|
-
//
|
|
75
|
-
|
|
|
73
|
+
type RpcCompatible<T> =
|
|
74
|
+
// Allow `unknown` as a leaf so records/interfaces with `unknown` fields remain compatible.
|
|
75
|
+
| (IsUnknown<T> extends true ? unknown : never)
|
|
76
|
+
// Structured cloneables
|
|
77
|
+
| BaseType
|
|
76
78
|
// Structured cloneable composites
|
|
77
79
|
| Map<
|
|
78
80
|
T extends Map<infer U, unknown> ? RpcCompatible<U> : never,
|
package/dist/index.d.ts
CHANGED
|
@@ -70,9 +70,11 @@ interface StubBase<T = unknown> extends Disposable {
|
|
|
70
70
|
// The reason for using a generic type here is to build a serializable subset of structured
|
|
71
71
|
// cloneable composite types. This allows types defined with the "interface" keyword to pass the
|
|
72
72
|
// serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
|
|
73
|
-
type RpcCompatible<T> =
|
|
74
|
-
//
|
|
75
|
-
|
|
|
73
|
+
type RpcCompatible<T> =
|
|
74
|
+
// Allow `unknown` as a leaf so records/interfaces with `unknown` fields remain compatible.
|
|
75
|
+
| (IsUnknown<T> extends true ? unknown : never)
|
|
76
|
+
// Structured cloneables
|
|
77
|
+
| BaseType
|
|
76
78
|
// Structured cloneable composites
|
|
77
79
|
| Map<
|
|
78
80
|
T extends Map<infer U, unknown> ? RpcCompatible<U> : never,
|