@evolu/common 8.7.0 → 8.8.0
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/src/Array.d.ts +21 -21
- package/dist/src/Array.js +5 -5
- package/dist/src/Assert.d.ts +478 -141
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +644 -99
- package/dist/src/{Buffer.d.ts → Binary.d.ts} +85 -12
- package/dist/src/Binary.d.ts.map +1 -0
- package/dist/src/{Buffer.js → Binary.js} +206 -24
- package/dist/src/Console.d.ts +2 -10
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +6 -12
- package/dist/src/Crypto.d.ts +5 -5
- package/dist/src/Crypto.js +1 -1
- package/dist/src/Eq.d.ts +35 -40
- package/dist/src/Eq.d.ts.map +1 -1
- package/dist/src/Eq.js +51 -87
- package/dist/src/Function.d.ts +9 -14
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +7 -9
- package/dist/src/Http.d.ts +6 -7
- package/dist/src/Http.d.ts.map +1 -1
- package/dist/src/LeakDetector.d.ts.map +1 -1
- package/dist/src/LeakDetector.js +1 -0
- package/dist/src/LockManager.d.ts +1 -1
- package/dist/src/LockManager.js +1 -1
- package/dist/src/Lookup.d.ts +3 -2
- package/dist/src/Lookup.d.ts.map +1 -1
- package/dist/src/Lookup.js +4 -3
- package/dist/src/Number.d.ts +1 -1
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +1 -1
- package/dist/src/Object.d.ts +4 -4
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +5 -4
- package/dist/src/Option.d.ts +1 -2
- package/dist/src/Option.d.ts.map +1 -1
- package/dist/src/Option.js +1 -2
- package/dist/src/Platform.js +2 -0
- package/dist/src/Polyfills.js +4 -1
- package/dist/src/Random.d.ts +1 -1
- package/dist/src/Result.d.ts +49 -54
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +17 -22
- package/dist/src/Set.d.ts +6 -6
- package/dist/src/Set.js +2 -2
- package/dist/src/Sqlite.js +1 -1
- package/dist/src/String.js +3 -2
- package/dist/src/Task.d.ts +32 -32
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +20 -22
- package/dist/src/Test.d.ts +31 -3
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Test.js +46 -3
- package/dist/src/Time.d.ts +3 -11
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +10 -18
- package/dist/src/Type.d.ts +87 -85
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +70 -63
- package/dist/src/Types.d.ts +12 -12
- package/dist/src/Types.js +1 -1
- package/dist/src/WebSocket.d.ts +4 -7
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/Worker.d.ts +1 -1
- package/dist/src/Worker.js +7 -7
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/intl/_en.d.ts.map +1 -1
- package/dist/src/intl/_en.js +1 -1
- package/dist/src/intl/ar.d.ts.map +1 -1
- package/dist/src/intl/ar.js +1 -1
- package/dist/src/intl/bn.d.ts.map +1 -1
- package/dist/src/intl/bn.js +1 -1
- package/dist/src/intl/ca.d.ts.map +1 -1
- package/dist/src/intl/ca.js +1 -1
- package/dist/src/intl/cs.d.ts.map +1 -1
- package/dist/src/intl/cs.js +1 -1
- package/dist/src/intl/da.d.ts.map +1 -1
- package/dist/src/intl/da.js +1 -1
- package/dist/src/intl/de.d.ts.map +1 -1
- package/dist/src/intl/de.js +1 -1
- package/dist/src/intl/el.d.ts.map +1 -1
- package/dist/src/intl/el.js +1 -1
- package/dist/src/intl/es.d.ts.map +1 -1
- package/dist/src/intl/es.js +1 -1
- package/dist/src/intl/fa.d.ts.map +1 -1
- package/dist/src/intl/fa.js +1 -1
- package/dist/src/intl/fi.d.ts.map +1 -1
- package/dist/src/intl/fi.js +1 -1
- package/dist/src/intl/fil.d.ts.map +1 -1
- package/dist/src/intl/fil.js +1 -1
- package/dist/src/intl/fr.d.ts.map +1 -1
- package/dist/src/intl/fr.js +1 -1
- package/dist/src/intl/he.d.ts.map +1 -1
- package/dist/src/intl/he.js +1 -1
- package/dist/src/intl/hi.d.ts.map +1 -1
- package/dist/src/intl/hi.js +1 -1
- package/dist/src/intl/hr.d.ts.map +1 -1
- package/dist/src/intl/hr.js +1 -1
- package/dist/src/intl/hu.d.ts.map +1 -1
- package/dist/src/intl/hu.js +1 -1
- package/dist/src/intl/id.d.ts.map +1 -1
- package/dist/src/intl/id.js +1 -1
- package/dist/src/intl/it.d.ts.map +1 -1
- package/dist/src/intl/it.js +1 -1
- package/dist/src/intl/ja.d.ts.map +1 -1
- package/dist/src/intl/ja.js +1 -1
- package/dist/src/intl/ko.d.ts.map +1 -1
- package/dist/src/intl/ko.js +1 -1
- package/dist/src/intl/ml.d.ts.map +1 -1
- package/dist/src/intl/ml.js +1 -1
- package/dist/src/intl/mr.d.ts.map +1 -1
- package/dist/src/intl/mr.js +1 -1
- package/dist/src/intl/ms.d.ts.map +1 -1
- package/dist/src/intl/ms.js +1 -1
- package/dist/src/intl/nb.d.ts.map +1 -1
- package/dist/src/intl/nb.js +1 -1
- package/dist/src/intl/nl.d.ts.map +1 -1
- package/dist/src/intl/nl.js +1 -1
- package/dist/src/intl/pa.d.ts.map +1 -1
- package/dist/src/intl/pa.js +1 -1
- package/dist/src/intl/pl.d.ts.map +1 -1
- package/dist/src/intl/pl.js +1 -1
- package/dist/src/intl/pt-BR.d.ts.map +1 -1
- package/dist/src/intl/pt-BR.js +1 -1
- package/dist/src/intl/pt.d.ts.map +1 -1
- package/dist/src/intl/pt.js +1 -1
- package/dist/src/intl/ro.d.ts.map +1 -1
- package/dist/src/intl/ro.js +1 -1
- package/dist/src/intl/sk.d.ts.map +1 -1
- package/dist/src/intl/sk.js +1 -1
- package/dist/src/intl/sl.d.ts.map +1 -1
- package/dist/src/intl/sl.js +1 -1
- package/dist/src/intl/sv.d.ts.map +1 -1
- package/dist/src/intl/sv.js +1 -1
- package/dist/src/intl/sw.d.ts.map +1 -1
- package/dist/src/intl/sw.js +1 -1
- package/dist/src/intl/ta.d.ts.map +1 -1
- package/dist/src/intl/ta.js +1 -1
- package/dist/src/intl/te.d.ts.map +1 -1
- package/dist/src/intl/te.js +1 -1
- package/dist/src/intl/th.d.ts.map +1 -1
- package/dist/src/intl/th.js +1 -1
- package/dist/src/intl/tr.d.ts.map +1 -1
- package/dist/src/intl/tr.js +1 -1
- package/dist/src/intl/uk.d.ts.map +1 -1
- package/dist/src/intl/uk.js +1 -1
- package/dist/src/intl/ur.d.ts.map +1 -1
- package/dist/src/intl/ur.js +1 -1
- package/dist/src/intl/vi.d.ts.map +1 -1
- package/dist/src/intl/vi.js +1 -1
- package/dist/src/intl/zh-CN.d.ts.map +1 -1
- package/dist/src/intl/zh-CN.js +1 -1
- package/dist/src/intl/zh-TW.d.ts.map +1 -1
- package/dist/src/intl/zh-TW.js +1 -1
- package/dist/src/local-first/Evolu.d.ts +12 -12
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +2 -2
- package/dist/src/local-first/Protocol.d.ts +14 -76
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +29 -206
- package/dist/src/local-first/Query.d.ts +11 -11
- package/dist/src/local-first/Query.js +6 -6
- package/dist/src/local-first/Relay.d.ts +2 -2
- package/dist/src/local-first/Schema.d.ts +3 -5
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +2 -4
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +5 -5
- package/dist/src/local-first/Storage.js +4 -4
- package/dist/src/local-first/Timestamp.d.ts +9 -0
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +13 -10
- package/package.json +7 -4
- package/src/Array.test.ts +809 -0
- package/src/Array.ts +21 -21
- package/src/Assert.test.ts +1181 -0
- package/src/Assert.ts +971 -227
- package/src/BigInt.test.ts +28 -0
- package/src/Binary.test.ts +1128 -0
- package/src/{Buffer.ts → Binary.ts} +273 -46
- package/src/Brand.test.ts +90 -0
- package/src/Cache.test.ts +183 -0
- package/src/Callbacks.test.ts +66 -0
- package/src/Console.test.ts +809 -0
- package/src/Console.ts +9 -17
- package/src/Crypto.test.ts +138 -0
- package/src/Crypto.ts +5 -5
- package/src/Eq.test.ts +333 -0
- package/src/Eq.ts +110 -176
- package/src/Error.test.ts +118 -0
- package/src/Function.test.ts +204 -0
- package/src/Function.ts +10 -15
- package/src/Http.test.ts +816 -0
- package/src/Http.ts +6 -7
- package/src/LeakDetector.test.ts +210 -0
- package/src/LeakDetector.ts +1 -0
- package/src/LockManager.ts +2 -2
- package/src/Lookup.test.ts +418 -0
- package/src/Lookup.ts +4 -3
- package/src/Microtask.test.ts +140 -0
- package/src/Number.test.ts +218 -0
- package/src/Number.ts +2 -2
- package/src/Object.test.ts +293 -0
- package/src/Object.ts +5 -4
- package/src/Option.test.ts +104 -0
- package/src/Option.ts +1 -2
- package/src/Order.test.ts +56 -0
- package/src/Platform.ts +2 -0
- package/src/Polyfills.ts +3 -4
- package/src/Random.test.ts +89 -0
- package/src/Random.ts +1 -1
- package/src/Ref.test.ts +139 -0
- package/src/RefCount.test.ts +184 -0
- package/src/Relation.test.ts +505 -0
- package/src/Resource.test.ts +4623 -0
- package/src/Result.test.ts +1829 -0
- package/src/Result.ts +49 -54
- package/src/Schedule.test.ts +1554 -0
- package/src/Set.test.ts +279 -0
- package/src/Set.ts +6 -6
- package/src/Sqlite.ts +1 -1
- package/src/Store.test.ts +288 -0
- package/src/String.test.ts +54 -0
- package/src/String.ts +3 -3
- package/src/Task.test.ts +10820 -0
- package/src/Task.ts +38 -43
- package/src/Test.test.ts +88 -0
- package/src/Test.ts +49 -3
- package/src/Time.test.ts +926 -0
- package/src/Time.ts +13 -21
- package/src/Type.base64.test.ts +88 -0
- package/src/Type.test.ts +20465 -0
- package/src/Type.ts +114 -111
- package/src/Types.test.ts +324 -0
- package/src/Types.ts +13 -13
- package/src/WebSocket.ts +4 -7
- package/src/Worker.test.ts +755 -0
- package/src/Worker.ts +13 -18
- package/src/index.ts +1 -1
- package/src/intl/_en.ts +1 -1
- package/src/intl/ar.ts +1 -1
- package/src/intl/bn.ts +1 -1
- package/src/intl/ca.ts +1 -1
- package/src/intl/cs.ts +1 -1
- package/src/intl/da.ts +1 -1
- package/src/intl/de.ts +1 -1
- package/src/intl/el.ts +1 -1
- package/src/intl/es.ts +1 -1
- package/src/intl/fa.ts +1 -1
- package/src/intl/fi.ts +1 -1
- package/src/intl/fil.ts +1 -1
- package/src/intl/fr.ts +1 -1
- package/src/intl/he.ts +1 -1
- package/src/intl/hi.ts +1 -1
- package/src/intl/hr.ts +1 -1
- package/src/intl/hu.ts +1 -1
- package/src/intl/id.ts +1 -1
- package/src/intl/intl.test.ts +3106 -0
- package/src/intl/it.ts +1 -1
- package/src/intl/ja.ts +1 -1
- package/src/intl/ko.ts +1 -1
- package/src/intl/ml.ts +1 -1
- package/src/intl/mr.ts +1 -1
- package/src/intl/ms.ts +1 -1
- package/src/intl/nb.ts +1 -1
- package/src/intl/nl.ts +1 -1
- package/src/intl/pa.ts +1 -1
- package/src/intl/pl.ts +1 -1
- package/src/intl/pt-BR.ts +1 -1
- package/src/intl/pt.ts +1 -1
- package/src/intl/ro.ts +1 -1
- package/src/intl/sk.ts +1 -1
- package/src/intl/sl.ts +1 -1
- package/src/intl/sv.ts +1 -1
- package/src/intl/sw.ts +1 -1
- package/src/intl/ta.ts +1 -1
- package/src/intl/te.ts +1 -1
- package/src/intl/th.ts +1 -1
- package/src/intl/tr.ts +1 -1
- package/src/intl/uk.ts +1 -1
- package/src/intl/ur.ts +1 -1
- package/src/intl/vi.ts +1 -1
- package/src/intl/zh-CN.ts +1 -1
- package/src/intl/zh-TW.ts +1 -1
- package/src/local-first/Evolu.test.ts +1921 -0
- package/src/local-first/Evolu.ts +18 -14
- package/src/local-first/Owner.test.ts +83 -0
- package/src/local-first/Protocol.test.ts +1037 -0
- package/src/local-first/Protocol.ts +58 -261
- package/src/local-first/Query.test.ts +349 -0
- package/src/local-first/Query.ts +11 -11
- package/src/local-first/Relay.ts +2 -2
- package/src/local-first/Schema.ts +3 -5
- package/src/local-first/Shared.test.ts +1828 -0
- package/src/local-first/Shared.ts +9 -8
- package/src/local-first/Storage.ts +4 -4
- package/src/local-first/Timestamp.test.ts +374 -0
- package/src/local-first/Timestamp.ts +22 -10
- package/dist/src/Buffer.d.ts.map +0 -1
package/dist/src/Type.js
CHANGED
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
* - Predefined constraints add a {@link Brand} to their Output.
|
|
15
15
|
* - Invalid declarations produce readable {@link CompileTimeError} types when the
|
|
16
16
|
* compiler can detect them.
|
|
17
|
-
* - Evolu Type uses runtime {@link assert | assertions} to detect
|
|
18
|
-
*
|
|
19
|
-
* arrays.
|
|
17
|
+
* - Evolu Type uses runtime {@link assert | assertions} to detect bugs that
|
|
18
|
+
* TypeScript cannot prevent, such as excess properties and sparse arrays.
|
|
20
19
|
* - Typed `from` boundaries allow connecting value producers to domain fields
|
|
21
20
|
* through their exact TypeScript types, so incompatible contract changes are
|
|
22
21
|
* compile-time errors rather than runtime validation errors.
|
|
@@ -77,14 +76,14 @@
|
|
|
77
76
|
* type Age = typeof Age.Output;
|
|
78
77
|
*
|
|
79
78
|
* assertType<
|
|
79
|
+
* Age,
|
|
80
80
|
* number &
|
|
81
81
|
* Brand<"NonNaN"> &
|
|
82
82
|
* Brand<"Finite"> &
|
|
83
83
|
* Brand<"Int"> &
|
|
84
84
|
* Brand<"NonNegative"> &
|
|
85
85
|
* Brand<"LessThan200"> &
|
|
86
|
-
* Brand<"Age"
|
|
87
|
-
* Age
|
|
86
|
+
* Brand<"Age">
|
|
88
87
|
* >();
|
|
89
88
|
*
|
|
90
89
|
* const User = object({
|
|
@@ -97,13 +96,13 @@
|
|
|
97
96
|
* const user = User.fromUnknown(value);
|
|
98
97
|
*
|
|
99
98
|
* assertOk(user, { name: "Ada", age: 37 });
|
|
100
|
-
* assertType<typeof
|
|
99
|
+
* assertType<typeof user.value, typeof User.Output>();
|
|
101
100
|
*
|
|
102
101
|
* const invalidUser = User.fromUnknown({ name: "Ada", age: 37.5 });
|
|
103
102
|
*
|
|
104
103
|
* assertErr(invalidUser);
|
|
105
104
|
* // InferErrors includes every structured error User.fromUnknown can return.
|
|
106
|
-
* assertType<InferErrors<typeof User
|
|
105
|
+
* assertType<typeof invalidUser.error, InferErrors<typeof User>>();
|
|
107
106
|
* assertType(Data, invalidUser.error);
|
|
108
107
|
* assertEqual(invalidUser.error, {
|
|
109
108
|
* type: "Object",
|
|
@@ -185,11 +184,11 @@
|
|
|
185
184
|
*
|
|
186
185
|
* // No "not a string" or "not trimmed" errors: the input guarantees both.
|
|
187
186
|
* assertType<
|
|
187
|
+
* typeof validatedTitle,
|
|
188
188
|
* Result<
|
|
189
189
|
* NonEmptyTrimmedString100,
|
|
190
190
|
* MaxLengthError<100> | MinLengthError<1>
|
|
191
|
-
*
|
|
192
|
-
* typeof validatedTitle
|
|
191
|
+
* >
|
|
193
192
|
* >();
|
|
194
193
|
* assertOk(validatedTitle, "Buy milk");
|
|
195
194
|
* ```
|
|
@@ -214,9 +213,8 @@
|
|
|
214
213
|
* Defending against it would add complexity without creating a meaningful
|
|
215
214
|
* security boundary.
|
|
216
215
|
*
|
|
217
|
-
* Runtime assertions still detect
|
|
218
|
-
*
|
|
219
|
-
* code.
|
|
216
|
+
* Runtime assertions still detect bugs that TypeScript cannot prevent. They are
|
|
217
|
+
* correctness checks, not defenses against malicious code.
|
|
220
218
|
*
|
|
221
219
|
* Evolu does not support subclassing native JavaScript objects. Such subclasses
|
|
222
220
|
* can be classified as their reported built-in representation, but their
|
|
@@ -350,9 +348,10 @@
|
|
|
350
348
|
* Consequently, structural representation errors such as sparse Arrays,
|
|
351
349
|
* accessors, and excess properties normally do not enter user-facing validation
|
|
352
350
|
* in typed application flows. They violate the producer's declared contract and
|
|
353
|
-
* throw
|
|
354
|
-
* schema-authoring tool, import, or external protocol, the
|
|
355
|
-
* legitimate typed validation errors and their formatter
|
|
351
|
+
* therefore throw instead of becoming validation errors. At a genuinely unknown
|
|
352
|
+
* boundary, such as a schema-authoring tool, import, or external protocol, the
|
|
353
|
+
* same issues are legitimate typed validation errors and their formatter
|
|
354
|
+
* messages are useful.
|
|
356
355
|
*
|
|
357
356
|
* This distinction applies to data failures. Any Type operation, including
|
|
358
357
|
* `fromUnknown`, can throw when trusted Type-declaration code, such as a
|
|
@@ -496,21 +495,21 @@ const formatDefaultRuntimeTypeIssue = (issue) => issue.formatError(issue.error);
|
|
|
496
495
|
export function assertType(type, value) {
|
|
497
496
|
if (type === undefined)
|
|
498
497
|
return;
|
|
499
|
-
// TODO: Make assert prepend "Expected " and accept an optional third cause
|
|
500
|
-
// argument. Then use it here and migrate every other assertion to pass an
|
|
501
|
-
// expectation fragment.
|
|
502
498
|
const runtimeType = type;
|
|
503
499
|
const result = runtimeType[outputValidationSymbol](value);
|
|
504
|
-
if (
|
|
505
|
-
|
|
506
|
-
}
|
|
500
|
+
if (result.ok)
|
|
501
|
+
return;
|
|
502
|
+
assert(false, `Expected ${runtimeType.name}.`, {
|
|
503
|
+
cause: result.error,
|
|
504
|
+
stackStartFn: assertType,
|
|
505
|
+
});
|
|
507
506
|
}
|
|
508
507
|
const assertTypeOutput = (name, is, validateOutput, value, options = firstValidationOptions) => {
|
|
509
508
|
if (is(value))
|
|
510
509
|
return;
|
|
511
510
|
const result = validateOutput(value, options);
|
|
512
511
|
const error = result.error;
|
|
513
|
-
|
|
512
|
+
assert(false, `Expected ${name}.`, { cause: error });
|
|
514
513
|
};
|
|
515
514
|
/**
|
|
516
515
|
* Creates localized copies of selected {@link Type} declarations.
|
|
@@ -567,7 +566,7 @@ const assertTypeOutput = (name, is, validateOutput, value, options = firstValida
|
|
|
567
566
|
* },
|
|
568
567
|
* );
|
|
569
568
|
*
|
|
570
|
-
* assertType<typeof Label, typeof
|
|
569
|
+
* assertType<typeof typesByLocale.cs.Label, typeof Label>();
|
|
571
570
|
*
|
|
572
571
|
* const result = typesByLocale.cs.Label.fromUnknown("");
|
|
573
572
|
* assertErr(result);
|
|
@@ -962,7 +961,7 @@ const createTypeOfType = (name) => {
|
|
|
962
961
|
* const WireValue100 = maxLength(100)(String);
|
|
963
962
|
* type WireValue100 = typeof WireValue100.Output;
|
|
964
963
|
*
|
|
965
|
-
* assertType<string & Brand<"MaxLength100"
|
|
964
|
+
* assertType<WireValue100, string & Brand<"MaxLength100">>();
|
|
966
965
|
* assertOk(WireValue100.fromUnknown(""), "");
|
|
967
966
|
* assertOk(WireValue100.fromUnknown(" value "), " value ");
|
|
968
967
|
* ```
|
|
@@ -1005,34 +1004,34 @@ export const String = /*#__PURE__*/ createTypeOfType("String");
|
|
|
1005
1004
|
* } from "@evolu/common";
|
|
1006
1005
|
*
|
|
1007
1006
|
* // Note how every additional constraint accumulates its Brand.
|
|
1008
|
-
* assertType<
|
|
1009
|
-
* assertType<number & Brand<"NonNaN"
|
|
1007
|
+
* assertType<typeof Number.Output, number>();
|
|
1008
|
+
* assertType<typeof NonNaNNumber.Output, number & Brand<"NonNaN">>();
|
|
1010
1009
|
* assertType<
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1010
|
+
* typeof FiniteNumber.Output,
|
|
1011
|
+
* number & Brand<"NonNaN"> & Brand<"Finite">
|
|
1013
1012
|
* >();
|
|
1014
1013
|
* assertType<
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1014
|
+
* typeof Int.Output,
|
|
1015
|
+
* number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int">
|
|
1017
1016
|
* >();
|
|
1018
1017
|
* assertType<
|
|
1018
|
+
* typeof NonNegativeInt.Output,
|
|
1019
1019
|
* number &
|
|
1020
1020
|
* Brand<"NonNaN"> &
|
|
1021
1021
|
* Brand<"Finite"> &
|
|
1022
1022
|
* Brand<"Int"> &
|
|
1023
|
-
* Brand<"NonNegative"
|
|
1024
|
-
* typeof NonNegativeInt.Output
|
|
1023
|
+
* Brand<"NonNegative">
|
|
1025
1024
|
* >();
|
|
1026
1025
|
*
|
|
1027
1026
|
* assertType<
|
|
1027
|
+
* typeof Age.Output,
|
|
1028
1028
|
* number &
|
|
1029
1029
|
* Brand<"NonNaN"> &
|
|
1030
1030
|
* Brand<"Finite"> &
|
|
1031
1031
|
* Brand<"Int"> &
|
|
1032
1032
|
* Brand<"NonNegative"> &
|
|
1033
1033
|
* Brand<"LessThan200"> &
|
|
1034
|
-
* Brand<"Age"
|
|
1035
|
-
* typeof Age.Output
|
|
1034
|
+
* Brand<"Age">
|
|
1036
1035
|
* >();
|
|
1037
1036
|
*
|
|
1038
1037
|
* assertOk(Age.fromUnknown(122), 122);
|
|
@@ -1187,7 +1186,7 @@ export const instanceOf = (constructor) => {
|
|
|
1187
1186
|
*
|
|
1188
1187
|
* const Ready = literal("ready");
|
|
1189
1188
|
*
|
|
1190
|
-
* assertType<
|
|
1189
|
+
* assertType<typeof Ready.Output, "ready">();
|
|
1191
1190
|
* assertOk(Ready.fromUnknown("ready"), "ready");
|
|
1192
1191
|
* const invalid = Ready.fromUnknown("pending");
|
|
1193
1192
|
* assertErr(invalid);
|
|
@@ -1385,20 +1384,20 @@ const isRuntimeUnionTypeNode = (type) => type.name === "Union" && "members" in t
|
|
|
1385
1384
|
*
|
|
1386
1385
|
* // Output is the decoded language and region.
|
|
1387
1386
|
* type SupportedLocale = typeof SupportedLocale.Output;
|
|
1388
|
-
* assertType<readonly ["en" | "cs", "US" | "CZ"]
|
|
1387
|
+
* assertType<SupportedLocale, readonly ["en" | "cs", "US" | "CZ"]>();
|
|
1389
1388
|
*
|
|
1390
1389
|
* // The parent Output is the canonical locale string.
|
|
1391
1390
|
* type SupportedLocaleLiteral = typeof SupportedLocale.parent.Output;
|
|
1392
1391
|
* assertType<
|
|
1393
|
-
*
|
|
1394
|
-
*
|
|
1392
|
+
* SupportedLocaleLiteral,
|
|
1393
|
+
* "en-US" | "en-CZ" | "cs-US" | "cs-CZ"
|
|
1395
1394
|
* >();
|
|
1396
1395
|
*
|
|
1397
1396
|
* // Parse an unknown string into structured data.
|
|
1398
1397
|
* const result = SupportedLocale.fromUnknown("cs-CZ");
|
|
1399
1398
|
* assertOk(result, ["cs", "CZ"]);
|
|
1400
1399
|
* const locale = result.value;
|
|
1401
|
-
* assertType<
|
|
1400
|
+
* assertType<typeof locale, SupportedLocale>();
|
|
1402
1401
|
* const invalid = SupportedLocale.fromUnknown("cs/CZ");
|
|
1403
1402
|
* assertErr(invalid);
|
|
1404
1403
|
* assertType(Data, invalid.error);
|
|
@@ -1410,13 +1409,13 @@ const isRuntimeUnionTypeNode = (type) => type.name === "Union" && "members" in t
|
|
|
1410
1409
|
*
|
|
1411
1410
|
* // Encode structured data into its canonical string.
|
|
1412
1411
|
* const localeLiteral = SupportedLocale.to(locale);
|
|
1413
|
-
* assertType<
|
|
1412
|
+
* assertType<typeof localeLiteral, SupportedLocaleLiteral>();
|
|
1414
1413
|
* assertEqual(localeLiteral, "cs-CZ");
|
|
1415
1414
|
*
|
|
1416
1415
|
* // Validate a string configuration value.
|
|
1417
1416
|
* const configValue: unknown = "cs-CZ";
|
|
1418
1417
|
* assertType(SupportedLocale.parent, configValue);
|
|
1419
|
-
* assertType<
|
|
1418
|
+
* assertType<typeof configValue, SupportedLocaleLiteral>();
|
|
1420
1419
|
* assertFalse(SupportedLocale.parent.is("fr-CZ"));
|
|
1421
1420
|
* ```
|
|
1422
1421
|
*
|
|
@@ -1468,11 +1467,11 @@ const isRuntimeUnionTypeNode = (type) => type.name === "Union" && "members" in t
|
|
|
1468
1467
|
* const result = ItemId.fromUnknown("item-42");
|
|
1469
1468
|
* assertOk(result, [42n]);
|
|
1470
1469
|
* const itemId = result.value;
|
|
1471
|
-
* assertType<
|
|
1470
|
+
* assertType<typeof itemId, ItemId>();
|
|
1472
1471
|
*
|
|
1473
1472
|
* // Encode the structured data into its canonical string.
|
|
1474
1473
|
* const itemIdLiteral = ItemId.to(itemId);
|
|
1475
|
-
* assertType<
|
|
1474
|
+
* assertType<typeof itemIdLiteral, ItemIdLiteral>();
|
|
1476
1475
|
* assertEqual(itemIdLiteral, "item-42");
|
|
1477
1476
|
*
|
|
1478
1477
|
* // TypeScript cannot prove from the literal alone that "42" is a valid Int64 encoding.
|
|
@@ -1598,7 +1597,7 @@ const createTemplateLiteralParserType = (templateParts) => {
|
|
|
1598
1597
|
String.from(value);
|
|
1599
1598
|
const result = decodeString(value, options);
|
|
1600
1599
|
if (!result.ok || encodeCaptures(result.value) !== value) {
|
|
1601
|
-
|
|
1600
|
+
assert(false, "Expected TemplateLiteral.", {
|
|
1602
1601
|
cause: result.ok
|
|
1603
1602
|
? {
|
|
1604
1603
|
type: "TemplateLiteral",
|
|
@@ -1645,8 +1644,8 @@ const createTemplateLiteralParserType = (templateParts) => {
|
|
|
1645
1644
|
* const Locale = templateLiteral(Language, "-", Region);
|
|
1646
1645
|
*
|
|
1647
1646
|
* assertType<
|
|
1648
|
-
*
|
|
1649
|
-
*
|
|
1647
|
+
* typeof Locale.Output,
|
|
1648
|
+
* "en-US" | "en-CZ" | "cs-US" | "cs-CZ"
|
|
1650
1649
|
* >();
|
|
1651
1650
|
* assertOk(Locale.fromUnknown("cs-CZ"), "cs-CZ");
|
|
1652
1651
|
* assertFalse(Locale.is("fr-CZ"));
|
|
@@ -1859,7 +1858,7 @@ export const UInt64 = /*#__PURE__*/ brand("UInt64", BigInt, (value) => globalThi
|
|
|
1859
1858
|
* const CapitalizedString = capitalized(String);
|
|
1860
1859
|
* type CapitalizedString = typeof CapitalizedString.Output;
|
|
1861
1860
|
*
|
|
1862
|
-
* assertType<string & Brand<"Capitalized"
|
|
1861
|
+
* assertType<CapitalizedString, string & Brand<"Capitalized">>();
|
|
1863
1862
|
*
|
|
1864
1863
|
* assertOk(CapitalizedString.fromUnknown("Evolu"), "Evolu");
|
|
1865
1864
|
* const invalid = CapitalizedString.fromUnknown("evolu");
|
|
@@ -2053,7 +2052,7 @@ export const length = (exact) => (parent) => {
|
|
|
2053
2052
|
* )(String);
|
|
2054
2053
|
* type UrlSafeString = typeof UrlSafeString.Output;
|
|
2055
2054
|
*
|
|
2056
|
-
* assertType<string & Brand<"UrlSafeString"
|
|
2055
|
+
* assertType<UrlSafeString, string & Brand<"UrlSafeString">>();
|
|
2057
2056
|
*
|
|
2058
2057
|
* assertOk(UrlSafeString.fromUnknown("abc-123_DEF"), "abc-123_DEF");
|
|
2059
2058
|
* const invalid = UrlSafeString.fromUnknown("not safe");
|
|
@@ -2102,6 +2101,7 @@ const base64UrlOptions = {
|
|
|
2102
2101
|
};
|
|
2103
2102
|
const uint8ArrayToBase64UrlString = (bytes) => {
|
|
2104
2103
|
if (hasNodeBuffer) {
|
|
2104
|
+
// oxlint-disable-next-line evolu/no-unnecessary-global-this -- Use the global object constructor verified by hasNodeBuffer even if a realm lexical binding shadows it.
|
|
2105
2105
|
return globalThis.Buffer.from(bytes).toString("base64url");
|
|
2106
2106
|
}
|
|
2107
2107
|
const uint8ArrayPrototype = globalThis.Uint8Array.prototype;
|
|
@@ -2114,6 +2114,7 @@ const uint8ArrayToBase64UrlString = (bytes) => {
|
|
|
2114
2114
|
};
|
|
2115
2115
|
const base64UrlStringToUint8Array = (value) => {
|
|
2116
2116
|
if (hasNodeBuffer) {
|
|
2117
|
+
// oxlint-disable-next-line evolu/no-unnecessary-global-this -- Use the global object constructor verified by hasNodeBuffer even if a realm lexical binding shadows it.
|
|
2117
2118
|
const buffer = globalThis.Buffer.from(value, "base64url");
|
|
2118
2119
|
return new globalThis.Uint8Array(buffer);
|
|
2119
2120
|
}
|
|
@@ -2211,6 +2212,12 @@ export const Mnemonic = /*#__PURE__*/ brand("Mnemonic", NonEmptyTrimmedString, (
|
|
|
2211
2212
|
/**
|
|
2212
2213
|
* Evolu Id: 16 bytes encoded as a 22-character {@link Base64Url}.
|
|
2213
2214
|
*
|
|
2215
|
+
* Like [Nano ID](https://github.com/ai/nanoid), it is compact and URL-safe.
|
|
2216
|
+
* Unlike Nano ID's 21-character default, an Evolu Id is the canonical Base64Url
|
|
2217
|
+
* encoding of a full 128-bit value, so it round-trips directly between its
|
|
2218
|
+
* string and byte representations with {@link idToIdBytes} and
|
|
2219
|
+
* {@link idBytesToId}. These helpers use native Base64 APIs.
|
|
2220
|
+
*
|
|
2214
2221
|
* {@link createId} is the privacy-preserving default. Use
|
|
2215
2222
|
* {@link createIdFromString} for stable mappings from external identifiers, or
|
|
2216
2223
|
* {@link createIdAsUuidv7} only when insertion locality is worth exposing the
|
|
@@ -2242,7 +2249,7 @@ export const Id = /*#__PURE__*/ brand("Id", String, (value) => value.length ===
|
|
|
2242
2249
|
* const userId = createId<"User">({ randomBytes: createRandomBytes() });
|
|
2243
2250
|
*
|
|
2244
2251
|
* assertTrue(Id.is(userId));
|
|
2245
|
-
* assertType<Id & Brand<"User"
|
|
2252
|
+
* assertType<typeof userId, Id & Brand<"User">>();
|
|
2246
2253
|
* ```
|
|
2247
2254
|
*
|
|
2248
2255
|
* @group String
|
|
@@ -2271,7 +2278,7 @@ export const createId = (deps, ..._validation) => uint8ArrayToBase64Url(deps.ran
|
|
|
2271
2278
|
* const todoId = createIdFromString<"Todo">("external-todo-456");
|
|
2272
2279
|
*
|
|
2273
2280
|
* assertEqual(first, second);
|
|
2274
|
-
* assertType<Id & Brand<"Todo"
|
|
2281
|
+
* assertType<typeof todoId, Id & Brand<"Todo">>();
|
|
2275
2282
|
* ```
|
|
2276
2283
|
*
|
|
2277
2284
|
* @group String
|
|
@@ -2338,7 +2345,7 @@ export const createIdAsUuidv7 = (deps, ..._validation) => {
|
|
|
2338
2345
|
* const TodoId = id("Todo");
|
|
2339
2346
|
* const todoId = TodoId.orThrow(createIdFromString("todo"));
|
|
2340
2347
|
*
|
|
2341
|
-
* assertType<Id & Brand<"Todo"
|
|
2348
|
+
* assertType<typeof todoId, Id & Brand<"Todo">>();
|
|
2342
2349
|
* ```
|
|
2343
2350
|
*
|
|
2344
2351
|
* @group String
|
|
@@ -2633,7 +2640,7 @@ export const PositiveFiniteNumber = /*#__PURE__*/ positive(NonNegativeFiniteNumb
|
|
|
2633
2640
|
* const Int = int(Number);
|
|
2634
2641
|
* type Int = typeof Int.Output;
|
|
2635
2642
|
*
|
|
2636
|
-
* assertType<number & Brand<"Int"
|
|
2643
|
+
* assertType<Int, number & Brand<"Int">>();
|
|
2637
2644
|
*
|
|
2638
2645
|
* assertOk(Int.fromUnknown(42), 42);
|
|
2639
2646
|
* const invalid = Int.fromUnknown(1.5);
|
|
@@ -3021,8 +3028,8 @@ export const NegativeDecimalString = /*#__PURE__*/ negativeDecimalString(NonPosi
|
|
|
3021
3028
|
* const Tenths = multipleOf("0.1")(FiniteNumber);
|
|
3022
3029
|
*
|
|
3023
3030
|
* assertType<
|
|
3024
|
-
*
|
|
3025
|
-
*
|
|
3031
|
+
* typeof Tenths.Output,
|
|
3032
|
+
* FiniteNumber & Brand<"MultipleOf0.1">
|
|
3026
3033
|
* >();
|
|
3027
3034
|
*
|
|
3028
3035
|
* assertOk(Tenths.fromUnknown(0.3), 0.3);
|
|
@@ -3148,8 +3155,8 @@ export const between = (min, max) => (parent) => {
|
|
|
3148
3155
|
* const result = UserIds.from.parent(["ada", "grace"]);
|
|
3149
3156
|
*
|
|
3150
3157
|
* assertType<
|
|
3151
|
-
*
|
|
3152
|
-
*
|
|
3158
|
+
* typeof result,
|
|
3159
|
+
* Result<ReadonlyArray<string & Brand<"UserId">>>
|
|
3153
3160
|
* >();
|
|
3154
3161
|
* assertOk(result, ["ada", "grace"]);
|
|
3155
3162
|
* assertOk(UserIds.fromUnknown(["ada", "grace"]), ["ada", "grace"]);
|
|
@@ -3994,8 +4001,8 @@ export { _Object as Object };
|
|
|
3994
4001
|
*
|
|
3995
4002
|
* assertOk(scoresFromInput, { ada: 10n, grace: 20n });
|
|
3996
4003
|
* assertType<
|
|
3997
|
-
*
|
|
3998
|
-
*
|
|
4004
|
+
* typeof scoresFromInput.value,
|
|
4005
|
+
* Readonly<Partial<Record<string, Int64>>>
|
|
3999
4006
|
* >();
|
|
4000
4007
|
* ```
|
|
4001
4008
|
*
|
|
@@ -4923,7 +4930,7 @@ export function lazy(getType) {
|
|
|
4923
4930
|
throw resolution.error;
|
|
4924
4931
|
case "resolving":
|
|
4925
4932
|
assert(false, "A Lazy Type definition must not resolve itself while it is being created.");
|
|
4926
|
-
//
|
|
4933
|
+
// oxlint-disable-next-line eslint/no-fallthrough
|
|
4927
4934
|
case "unresolved": {
|
|
4928
4935
|
resolution = { state: "resolving" };
|
|
4929
4936
|
try {
|
|
@@ -5546,7 +5553,7 @@ const stringifyJsonValue = (value) => {
|
|
|
5546
5553
|
* const result = JsonValue.fromUnknown(input);
|
|
5547
5554
|
*
|
|
5548
5555
|
* assertOk(result, input);
|
|
5549
|
-
* assertType<
|
|
5556
|
+
* assertType<typeof result.value, JsonValue>();
|
|
5550
5557
|
* ```
|
|
5551
5558
|
*
|
|
5552
5559
|
* @group JSON
|
|
@@ -5672,8 +5679,8 @@ export const JsonValueFromJson = /*#__PURE__*/ transform("JsonValueFromJson", Js
|
|
|
5672
5679
|
* const userJson = userToUserJson(user);
|
|
5673
5680
|
*
|
|
5674
5681
|
* assertType<
|
|
5675
|
-
*
|
|
5676
|
-
*
|
|
5682
|
+
* typeof userJson,
|
|
5683
|
+
* string & Brand<"Json"> & Brand<"UserJson">
|
|
5677
5684
|
* >();
|
|
5678
5685
|
* assertEqual(userJson, '{"name":"Ada","age":37}');
|
|
5679
5686
|
* assertEqual(UserJson.orThrow(userJson), userJson);
|
|
@@ -5719,7 +5726,7 @@ export const json = (type, name, ..._validation) => {
|
|
|
5719
5726
|
assertType(Json, value);
|
|
5720
5727
|
const result = jsonStringToBrandedJson(value, options);
|
|
5721
5728
|
if (!result.ok && result.error.type === "Json") {
|
|
5722
|
-
|
|
5729
|
+
assert(false, "Expected Json.", { cause: result.error });
|
|
5723
5730
|
}
|
|
5724
5731
|
return result;
|
|
5725
5732
|
};
|
package/dist/src/Types.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ export type PredicateWithIndex<T> = (value: T, index: number) => boolean;
|
|
|
108
108
|
* ### Narrowing a value
|
|
109
109
|
*
|
|
110
110
|
* ```ts
|
|
111
|
-
* import {
|
|
111
|
+
* import { assertEqual, assertTrue, type Refinement } from "@evolu/common";
|
|
112
112
|
*
|
|
113
113
|
* interface Animal {
|
|
114
114
|
* readonly name: string;
|
|
@@ -121,7 +121,7 @@ export type PredicateWithIndex<T> = (value: T, index: number) => boolean;
|
|
|
121
121
|
* "breed" in animal;
|
|
122
122
|
* const dog: Dog = { name: "Dog", breed: "Beagle" };
|
|
123
123
|
* const animal: Animal = dog;
|
|
124
|
-
*
|
|
124
|
+
* assertTrue(isDog(animal));
|
|
125
125
|
*
|
|
126
126
|
* assertEqual(animal.breed, "Beagle");
|
|
127
127
|
* ```
|
|
@@ -160,7 +160,7 @@ export type Refinement<in A, out B extends A> = (a: A) => a is B;
|
|
|
160
160
|
* ];
|
|
161
161
|
* const [numbers, others] = partitionArray(items, isNumberItem);
|
|
162
162
|
*
|
|
163
|
-
* assertType<ReadonlyArray<NumberItem
|
|
163
|
+
* assertType<typeof numbers, ReadonlyArray<NumberItem>>();
|
|
164
164
|
* assertTrue(numbers[0]?.value === 2);
|
|
165
165
|
* assertTrue(others[0]?.value === 1);
|
|
166
166
|
* ```
|
|
@@ -247,11 +247,11 @@ export declare const isInstance: <Value extends Instance<string>>(name: Value["~
|
|
|
247
247
|
* };
|
|
248
248
|
*
|
|
249
249
|
* assertType<
|
|
250
|
+
* NullablePartial<Example>,
|
|
250
251
|
* {
|
|
251
252
|
* required: string;
|
|
252
253
|
* optionalWithNull?: string | null;
|
|
253
|
-
* }
|
|
254
|
-
* NullablePartial<Example>
|
|
254
|
+
* }
|
|
255
255
|
* >();
|
|
256
256
|
* ```
|
|
257
257
|
*/
|
|
@@ -300,11 +300,11 @@ export type Writable<T> = {
|
|
|
300
300
|
* type B = Simplify<A>;
|
|
301
301
|
*
|
|
302
302
|
* assertType<
|
|
303
|
+
* B,
|
|
303
304
|
* {
|
|
304
305
|
* a: string;
|
|
305
306
|
* b: number;
|
|
306
|
-
* }
|
|
307
|
-
* B
|
|
307
|
+
* }
|
|
308
308
|
* >();
|
|
309
309
|
* ```
|
|
310
310
|
*/
|
|
@@ -386,10 +386,10 @@ export type CompileTimeError<Context extends string, Message extends string> = `
|
|
|
386
386
|
* import { assertType, type IsSameType } from "@evolu/common";
|
|
387
387
|
*
|
|
388
388
|
* assertType<
|
|
389
|
-
*
|
|
390
|
-
*
|
|
389
|
+
* IsSameType<{ readonly id: string }, { readonly id: string }>,
|
|
390
|
+
* true
|
|
391
391
|
* >();
|
|
392
|
-
* assertType<
|
|
392
|
+
* assertType<IsSameType<"ready", string>, false>();
|
|
393
393
|
* ```
|
|
394
394
|
*/
|
|
395
395
|
export type IsSameType<A, B> = (<T>() => T extends (A & T) | T ? true : false) extends <T>() => (T extends (B & T) | T ? true : false) ? [A] extends [never] ? [B] extends [never] ? true : false : [B] extends [never] ? false : true : false;
|
|
@@ -419,8 +419,8 @@ export type ParameterIntersection<T> = [T] extends [(value: infer I) => void] ?
|
|
|
419
419
|
* type Payload = DistributiveOmit<Event, "shared">;
|
|
420
420
|
*
|
|
421
421
|
* assertType<
|
|
422
|
-
*
|
|
423
|
-
*
|
|
422
|
+
* Payload,
|
|
423
|
+
* { type: "a"; a: string } | { type: "b"; b: number }
|
|
424
424
|
* >();
|
|
425
425
|
* ```
|
|
426
426
|
*/
|
package/dist/src/Types.js
CHANGED
|
@@ -36,7 +36,7 @@ export const instance = (name) => ({ "~evolu/instance": name });
|
|
|
36
36
|
*/
|
|
37
37
|
export const isInstance = (name) => (value) => value !== null &&
|
|
38
38
|
typeof value === "object" &&
|
|
39
|
-
|
|
39
|
+
Object.hasOwn(value, "~evolu/instance") &&
|
|
40
40
|
value["~evolu/instance"] === name;
|
|
41
41
|
/**
|
|
42
42
|
* Type guard to check if a value is a {@link PromiseLike}.
|
package/dist/src/WebSocket.d.ts
CHANGED
|
@@ -46,10 +46,10 @@ import { type Typed } from "./Type.ts";
|
|
|
46
46
|
*
|
|
47
47
|
* ```ts
|
|
48
48
|
* import {
|
|
49
|
-
* assert,
|
|
50
49
|
* assertEqual,
|
|
50
|
+
* assertLength,
|
|
51
51
|
* assertOk,
|
|
52
|
-
*
|
|
52
|
+
* assertSame,
|
|
53
53
|
* createRun,
|
|
54
54
|
* createWebSocket,
|
|
55
55
|
* testCreateWebSocket,
|
|
@@ -76,12 +76,9 @@ import { type Typed } from "./Type.ts";
|
|
|
76
76
|
* await using run = createRun();
|
|
77
77
|
*
|
|
78
78
|
* assertOk(await run(connectAndSend(socketFactory)), undefined);
|
|
79
|
-
*
|
|
79
|
+
* assertLength(socketFactory.sentMessages, 1);
|
|
80
80
|
* const message = socketFactory.sentMessages[0];
|
|
81
|
-
*
|
|
82
|
-
* message !== undefined && typeof message.data === "string",
|
|
83
|
-
* "Expected a text message.",
|
|
84
|
-
* );
|
|
81
|
+
* assertSame(typeof message.data, "string");
|
|
85
82
|
* assertEqual(
|
|
86
83
|
* { url: message.url, data: message.data },
|
|
87
84
|
* { url: "wss://example.com", data: "Hello" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocket.d.ts","sourceRoot":"","sources":["../../src/WebSocket.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAmC,KAAK,KAAK,EAAE,MAAM,WAAW,CAA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C,UAAU,KACvD,IAAI,CAAC;IACV,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;CACxE;AAED,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,QACxB,MAAM,KACV,OAAO,CAAC,kBAAkB,CAwE5B,CAAC"}
|
package/dist/src/Worker.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface MessagePort<Input, Output = never> extends Disposable {
|
|
|
67
67
|
* port: consoleChannel.port1.native,
|
|
68
68
|
* };
|
|
69
69
|
*
|
|
70
|
-
* assertType<
|
|
70
|
+
* assertType<typeof init.port, NativeMessagePort<ConsoleMessage>>();
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
73
|
readonly native: NativeMessagePort<Input, Output>;
|
package/dist/src/Worker.js
CHANGED
|
@@ -55,7 +55,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
55
55
|
var e = new Error(message);
|
|
56
56
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
57
57
|
});
|
|
58
|
-
import { assert } from "./Assert.js";
|
|
58
|
+
import { assert, assertNotUndefined } from "./Assert.js";
|
|
59
59
|
import { disposable } from "./Function.js";
|
|
60
60
|
/**
|
|
61
61
|
* Creates an in-memory {@link Worker}.
|
|
@@ -182,7 +182,7 @@ export const createBroadcastChannel = (name) => {
|
|
|
182
182
|
return disposable({
|
|
183
183
|
postMessage: (message) => {
|
|
184
184
|
const dispatches = broadcastChannelDispatchesByName.get(name);
|
|
185
|
-
|
|
185
|
+
assertNotUndefined(dispatches);
|
|
186
186
|
for (const otherDispatch of dispatches) {
|
|
187
187
|
if (otherDispatch === dispatch)
|
|
188
188
|
continue;
|
|
@@ -407,7 +407,7 @@ const createPort = ({ receive, peerReceive, native, }) => {
|
|
|
407
407
|
peerReceive.ownerCount === 0)
|
|
408
408
|
return;
|
|
409
409
|
for (const transferable of transfer ?? []) {
|
|
410
|
-
if (transferable instanceof
|
|
410
|
+
if (transferable instanceof ArrayBuffer)
|
|
411
411
|
continue;
|
|
412
412
|
const registration = nativePortRegistry.get(transferable);
|
|
413
413
|
if (!registration)
|
|
@@ -445,10 +445,10 @@ const workerTaskIdleWaiters = new Set();
|
|
|
445
445
|
let workerTaskIdleCheckTimeoutId;
|
|
446
446
|
const scheduleWorkerTask = (callback) => {
|
|
447
447
|
if (workerTaskIdleCheckTimeoutId != null) {
|
|
448
|
-
|
|
448
|
+
clearTimeout(workerTaskIdleCheckTimeoutId);
|
|
449
449
|
workerTaskIdleCheckTimeoutId = undefined;
|
|
450
450
|
}
|
|
451
|
-
const timeoutId =
|
|
451
|
+
const timeoutId = setTimeout(() => {
|
|
452
452
|
pendingWorkerTaskIds.delete(timeoutId);
|
|
453
453
|
try {
|
|
454
454
|
callback();
|
|
@@ -461,7 +461,7 @@ const scheduleWorkerTask = (callback) => {
|
|
|
461
461
|
return timeoutId;
|
|
462
462
|
};
|
|
463
463
|
const cancelWorkerTask = (timeoutId) => {
|
|
464
|
-
|
|
464
|
+
clearTimeout(timeoutId);
|
|
465
465
|
pendingWorkerTaskIds.delete(timeoutId);
|
|
466
466
|
queueMicrotask(notifyWorkerTaskIdle);
|
|
467
467
|
};
|
|
@@ -470,7 +470,7 @@ const notifyWorkerTaskIdle = () => {
|
|
|
470
470
|
workerTaskIdleWaiters.size === 0 ||
|
|
471
471
|
workerTaskIdleCheckTimeoutId != null)
|
|
472
472
|
return;
|
|
473
|
-
workerTaskIdleCheckTimeoutId =
|
|
473
|
+
workerTaskIdleCheckTimeoutId = setTimeout(() => {
|
|
474
474
|
workerTaskIdleCheckTimeoutId = undefined;
|
|
475
475
|
for (const resolve of workerTaskIdleWaiters)
|
|
476
476
|
resolve();
|
package/dist/src/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export * from "./Array.ts";
|
|
|
7
7
|
export * from "./Assert.ts";
|
|
8
8
|
export * from "./BigInt.ts";
|
|
9
9
|
export * from "./Brand.ts";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./Binary.ts";
|
|
11
11
|
export * from "./Cache.ts";
|
|
12
12
|
export * from "./Callbacks.ts";
|
|
13
13
|
export * from "./Console.ts";
|
package/dist/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export * from "./Array.js";
|
|
|
7
7
|
export * from "./Assert.js";
|
|
8
8
|
export * from "./BigInt.js";
|
|
9
9
|
export * from "./Brand.js";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./Binary.js";
|
|
11
11
|
export * from "./Cache.js";
|
|
12
12
|
export * from "./Callbacks.js";
|
|
13
13
|
export * from "./Console.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_en.d.ts","sourceRoot":"","sources":["../../../src/intl/_en.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,cAAc,EACd,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,6BAA6B,EAC7B,gBAAgB,EAChB,6BAA6B,EAC7B,gBAAgB,EAChB,WAAW,EAGX,cAAc,EAEd,0BAA0B,EAC1B,aAAa,EACb,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,UAAU,EACX,MAAM,YAA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