metano-runtime 2.10.1 → 3.0.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/README.md +11 -1
- package/dist/system/argument-guards.d.ts +63 -0
- package/dist/system/argument-guards.js +155 -0
- package/dist/system/array-length.d.ts +6 -0
- package/dist/system/array-length.js +17 -0
- package/dist/system/big-integer.d.ts +50 -0
- package/dist/system/big-integer.js +108 -0
- package/dist/system/boolean-format.d.ts +6 -0
- package/dist/system/boolean-format.js +11 -0
- package/dist/system/collections/builder-iterator.d.ts +14 -0
- package/dist/system/collections/builder-iterator.js +15 -0
- package/dist/system/collections/checks.d.ts +17 -0
- package/dist/system/collections/checks.js +0 -0
- package/dist/system/collections/close-collection.d.ts +33 -0
- package/dist/system/collections/close-collection.js +68 -0
- package/dist/system/collections/collection-type-name.d.ts +11 -0
- package/dist/system/collections/collection-type-name.js +19 -0
- package/dist/system/collections/concurrent-dictionary.d.ts +80 -0
- package/dist/system/collections/concurrent-dictionary.js +261 -0
- package/dist/system/collections/copy-to.d.ts +8 -0
- package/dist/system/collections/copy-to.js +37 -0
- package/dist/system/collections/default-comparer.d.ts +64 -0
- package/dist/system/collections/default-comparer.js +231 -0
- package/dist/system/collections/descriptors.d.ts +58 -0
- package/dist/system/collections/descriptors.js +181 -0
- package/dist/system/collections/dictionary-helpers.d.ts +3 -28
- package/dist/system/collections/dictionary-helpers.js +3 -38
- package/dist/system/collections/dictionary-views.d.ts +39 -0
- package/dist/system/collections/dictionary-views.js +153 -0
- package/dist/system/collections/dictionary.d.ts +68 -0
- package/dist/system/collections/dictionary.js +165 -0
- package/dist/system/collections/hash-core.d.ts +51 -0
- package/dist/system/collections/hash-core.js +160 -0
- package/dist/system/collections/hash-set.d.ts +51 -24
- package/dist/system/collections/hash-set.js +165 -137
- package/dist/system/collections/helpers.d.ts +29 -0
- package/dist/system/collections/helpers.js +73 -0
- package/dist/system/collections/immutable-array-builder.d.ts +37 -0
- package/dist/system/collections/immutable-array-builder.js +117 -0
- package/dist/system/collections/immutable-array.d.ts +74 -0
- package/dist/system/collections/immutable-array.js +243 -0
- package/dist/system/collections/immutable-dictionary-builder.d.ts +58 -0
- package/dist/system/collections/immutable-dictionary-builder.js +126 -0
- package/dist/system/collections/immutable-dictionary.d.ts +80 -0
- package/dist/system/collections/immutable-dictionary.js +284 -0
- package/dist/system/collections/immutable-hash-set-builder.d.ts +58 -0
- package/dist/system/collections/immutable-hash-set-builder.js +125 -0
- package/dist/system/collections/immutable-hash-set.d.ts +71 -0
- package/dist/system/collections/immutable-hash-set.js +242 -0
- package/dist/system/collections/immutable-interfaces.d.ts +51 -0
- package/dist/system/collections/immutable-interfaces.js +0 -0
- package/dist/system/collections/immutable-list-builder-core.d.ts +58 -0
- package/dist/system/collections/immutable-list-builder-core.js +136 -0
- package/dist/system/collections/immutable-list-builder.d.ts +35 -0
- package/dist/system/collections/immutable-list-builder.js +73 -0
- package/dist/system/collections/immutable-list-core.d.ts +98 -0
- package/dist/system/collections/immutable-list-core.js +268 -0
- package/dist/system/collections/immutable-list.d.ts +49 -0
- package/dist/system/collections/immutable-list.js +176 -0
- package/dist/system/collections/immutable-storage.d.ts +50 -0
- package/dist/system/collections/immutable-storage.js +83 -0
- package/dist/system/collections/index.d.ts +25 -2
- package/dist/system/collections/index.js +22 -2
- package/dist/system/collections/interfaces.d.ts +76 -0
- package/dist/system/collections/interfaces.js +0 -0
- package/dist/system/collections/list.d.ts +96 -0
- package/dist/system/collections/list.js +335 -0
- package/dist/system/collections/queue.d.ts +44 -0
- package/dist/system/collections/queue.js +115 -0
- package/dist/system/collections/read-only-list.d.ts +45 -0
- package/dist/system/collections/read-only-list.js +152 -0
- package/dist/system/collections/red-black-tree.d.ts +64 -0
- package/dist/system/collections/red-black-tree.js +361 -0
- package/dist/system/collections/set-algebra.d.ts +15 -0
- package/dist/system/collections/set-algebra.js +58 -0
- package/dist/system/collections/sorted-array.d.ts +14 -0
- package/dist/system/collections/sorted-array.js +31 -0
- package/dist/system/collections/sorted-dictionary.d.ts +64 -0
- package/dist/system/collections/sorted-dictionary.js +163 -0
- package/dist/system/collections/sorted-list.d.ts +131 -0
- package/dist/system/collections/sorted-list.js +301 -0
- package/dist/system/collections/sorted-set.d.ts +98 -0
- package/dist/system/collections/sorted-set.js +255 -0
- package/dist/system/collections/stack.d.ts +39 -0
- package/dist/system/collections/stack.js +106 -0
- package/dist/system/collections/throw-helpers.d.ts +77 -0
- package/dist/system/collections/throw-helpers.js +158 -0
- package/dist/system/date-time-offset.d.ts +23 -0
- package/dist/system/date-time-offset.js +61 -0
- package/dist/system/decimal-parsing.d.ts +18 -0
- package/dist/system/decimal-parsing.js +74 -0
- package/dist/system/decimal.d.ts +20 -0
- package/dist/system/decimal.js +30 -0
- package/dist/system/default-text.d.ts +11 -0
- package/dist/system/default-text.js +52 -0
- package/dist/system/delegates.js +1 -1
- package/dist/system/double-format.d.ts +20 -0
- package/dist/system/double-format.js +171 -0
- package/dist/system/dynamic-conversion.d.ts +37 -0
- package/dist/system/dynamic-conversion.js +229 -0
- package/dist/system/equality.d.ts +23 -3
- package/dist/system/equality.js +135 -3
- package/dist/system/exceptions/argument-exception.d.ts +17 -0
- package/dist/system/exceptions/argument-exception.js +44 -0
- package/dist/system/exceptions/argument-null-exception.d.ts +16 -0
- package/dist/system/exceptions/argument-null-exception.js +35 -0
- package/dist/system/exceptions/argument-out-of-range-exception.d.ts +18 -0
- package/dist/system/exceptions/argument-out-of-range-exception.js +51 -0
- package/dist/system/exceptions/arithmetic-exception.d.ts +12 -0
- package/dist/system/exceptions/arithmetic-exception.js +31 -0
- package/dist/system/exceptions/divide-by-zero-exception.d.ts +12 -0
- package/dist/system/exceptions/divide-by-zero-exception.js +31 -0
- package/dist/system/exceptions/exception.d.ts +38 -0
- package/dist/system/exceptions/exception.js +77 -0
- package/dist/system/exceptions/format-exception.d.ts +12 -0
- package/dist/system/exceptions/format-exception.js +31 -0
- package/dist/system/exceptions/index-out-of-range-exception.d.ts +12 -0
- package/dist/system/exceptions/index-out-of-range-exception.js +31 -0
- package/dist/system/exceptions/index.d.ts +26 -0
- package/dist/system/exceptions/index.js +26 -0
- package/dist/system/exceptions/invalid-cast-exception.d.ts +12 -0
- package/dist/system/exceptions/invalid-cast-exception.js +31 -0
- package/dist/system/exceptions/invalid-operation-exception.d.ts +12 -0
- package/dist/system/exceptions/invalid-operation-exception.js +31 -0
- package/dist/system/exceptions/json-exception.d.ts +18 -0
- package/dist/system/exceptions/json-exception.js +39 -0
- package/dist/system/exceptions/key-not-found-exception.d.ts +13 -0
- package/dist/system/exceptions/key-not-found-exception.js +34 -0
- package/dist/system/exceptions/message-value.d.ts +7 -0
- package/dist/system/exceptions/message-value.js +9 -0
- package/dist/system/exceptions/missing-method-exception.d.ts +19 -0
- package/dist/system/exceptions/missing-method-exception.js +38 -0
- package/dist/system/exceptions/named-exception.d.ts +7 -0
- package/dist/system/exceptions/named-exception.js +29 -0
- package/dist/system/exceptions/not-implemented-exception.d.ts +12 -0
- package/dist/system/exceptions/not-implemented-exception.js +31 -0
- package/dist/system/exceptions/not-supported-exception.d.ts +12 -0
- package/dist/system/exceptions/not-supported-exception.js +31 -0
- package/dist/system/exceptions/null-reference-exception.d.ts +12 -0
- package/dist/system/exceptions/null-reference-exception.js +31 -0
- package/dist/system/exceptions/object-disposed-exception.d.ts +18 -0
- package/dist/system/exceptions/object-disposed-exception.js +41 -0
- package/dist/system/exceptions/operation-canceled-exception.d.ts +12 -0
- package/dist/system/exceptions/operation-canceled-exception.js +31 -0
- package/dist/system/exceptions/overflow-exception.d.ts +15 -0
- package/dist/system/exceptions/overflow-exception.js +34 -0
- package/dist/system/exceptions/switch-expression-exception.d.ts +21 -0
- package/dist/system/exceptions/switch-expression-exception.js +49 -0
- package/dist/system/exceptions/system-exception.d.ts +12 -0
- package/dist/system/exceptions/system-exception.js +31 -0
- package/dist/system/exceptions/task-canceled-exception.d.ts +13 -0
- package/dist/system/exceptions/task-canceled-exception.js +34 -0
- package/dist/system/exceptions/timeout-exception.d.ts +12 -0
- package/dist/system/exceptions/timeout-exception.js +31 -0
- package/dist/system/exceptions/to-exception.d.ts +25 -0
- package/dist/system/exceptions/to-exception.js +53 -0
- package/dist/system/exceptions/type-initialization-exception.d.ts +19 -0
- package/dist/system/exceptions/type-initialization-exception.js +36 -0
- package/dist/system/hash-code.d.ts +0 -7
- package/dist/system/hash-code.js +3 -1
- package/dist/system/identity-memo.d.ts +7 -0
- package/dist/system/identity-memo.js +14 -0
- package/dist/system/index.d.ts +21 -0
- package/dist/system/index.js +21 -0
- package/dist/system/int64-convert.d.ts +59 -0
- package/dist/system/int64-convert.js +226 -0
- package/dist/system/int64-format.d.ts +13 -0
- package/dist/system/int64-format.js +28 -0
- package/dist/system/int64-math.d.ts +56 -0
- package/dist/system/int64-math.js +109 -0
- package/dist/system/int64-parsing.d.ts +45 -0
- package/dist/system/int64-parsing.js +153 -0
- package/dist/system/int64.d.ts +134 -0
- package/dist/system/int64.js +298 -0
- package/dist/system/integer-division.d.ts +1 -1
- package/dist/system/integer-division.js +2 -3
- package/dist/system/integer-format.d.ts +12 -0
- package/dist/system/integer-format.js +22 -0
- package/dist/system/integer-standard-format.d.ts +9 -0
- package/dist/system/integer-standard-format.js +66 -0
- package/dist/system/json/byte-array-converter.d.ts +19 -0
- package/dist/system/json/byte-array-converter.js +106 -0
- package/dist/system/json/container-depth.d.ts +10 -0
- package/dist/system/json/container-depth.js +43 -16
- package/dist/system/json/contract-name.d.ts +8 -3
- package/dist/system/json/contract-name.js +22 -2
- package/dist/system/json/converter-set-cache.d.ts +17 -0
- package/dist/system/json/converter-set-cache.js +26 -0
- package/dist/system/json/converters.d.ts +27 -12
- package/dist/system/json/converters.js +498 -169
- package/dist/system/json/decimal-text.d.ts +9 -0
- package/dist/system/json/decimal-text.js +125 -0
- package/dist/system/json/dictionary-keys.d.ts +31 -0
- package/dist/system/json/dictionary-keys.js +195 -0
- package/dist/system/json/errors.d.ts +9 -11
- package/dist/system/json/errors.js +9 -11
- package/dist/system/json/exact-json-number.d.ts +103 -0
- package/dist/system/json/exact-json-number.js +155 -0
- package/dist/system/json/exact-number-reads.d.ts +21 -0
- package/dist/system/json/exact-number-reads.js +104 -0
- package/dist/system/json/index.d.ts +1 -2
- package/dist/system/json/index.js +0 -1
- package/dist/system/json/json-serializer.d.ts +64 -9
- package/dist/system/json/json-serializer.js +52 -12
- package/dist/system/json/json-text-reader.d.ts +33 -0
- package/dist/system/json/json-text-reader.js +608 -0
- package/dist/system/json/null-reads.d.ts +22 -0
- package/dist/system/json/null-reads.js +43 -0
- package/dist/system/json/number-from-string.d.ts +44 -0
- package/dist/system/json/number-from-string.js +248 -0
- package/dist/system/json/numeric-converters.d.ts +65 -0
- package/dist/system/json/numeric-converters.js +361 -0
- package/dist/system/json/numeric-enum-members.d.ts +18 -0
- package/dist/system/json/numeric-enum-members.js +18 -0
- package/dist/system/json/ordinal-ignore-case.d.ts +14 -0
- package/dist/system/json/ordinal-ignore-case.js +60 -0
- package/dist/system/json/polymorphism.d.ts +2 -0
- package/dist/system/json/polymorphism.js +101 -20
- package/dist/system/json/property-lookup.d.ts +17 -0
- package/dist/system/json/property-lookup.js +32 -0
- package/dist/system/json/property-naming-policy.d.ts +5 -5
- package/dist/system/json/property-naming-policy.js +163 -73
- package/dist/system/json/serializer-context.d.ts +19 -4
- package/dist/system/json/serializer-context.js +33 -7
- package/dist/system/json/spec-kind.d.ts +3 -0
- package/dist/system/json/spec-kind.js +4 -0
- package/dist/system/json/temporal-reads.d.ts +15 -0
- package/dist/system/json/temporal-reads.js +423 -0
- package/dist/system/json/temporal-text.d.ts +16 -0
- package/dist/system/json/temporal-text.js +32 -0
- package/dist/system/json/types.d.ts +190 -24
- package/dist/system/json/types.js +0 -1
- package/dist/system/json/value-converter.d.ts +5 -0
- package/dist/system/json/value-converter.js +0 -0
- package/dist/system/lazy-value.d.ts +9 -0
- package/dist/system/lazy-value.js +19 -0
- package/dist/system/linq/compare-keys.js +4 -0
- package/dist/system/linq/decimal-terminals.d.ts +24 -0
- package/dist/system/linq/decimal-terminals.js +67 -0
- package/dist/system/linq/expr-tree-visitor.d.ts +2 -27
- package/dist/system/linq/expr-tree-visitor.js +62 -0
- package/dist/system/linq/expr-tree.d.ts +11 -1
- package/dist/system/linq/index.d.ts +7 -4
- package/dist/system/linq/index.js +4 -2
- package/dist/system/linq/int64-terminals.d.ts +33 -0
- package/dist/system/linq/int64-terminals.js +131 -0
- package/dist/system/linq/operators.d.ts +7 -1
- package/dist/system/linq/operators.js +60 -2
- package/dist/system/linq/terminals.d.ts +85 -7
- package/dist/system/linq/terminals.js +220 -67
- package/dist/system/linq/types.d.ts +101 -20
- package/dist/system/math.d.ts +6 -5
- package/dist/system/math.js +26 -14
- package/dist/system/number-parsing.d.ts +43 -17
- package/dist/system/number-parsing.js +121 -37
- package/dist/system/record-copy.js +11 -0
- package/dist/system/reflection/box.d.ts +19 -0
- package/dist/system/reflection/box.js +32 -0
- package/dist/system/reflection/boxed-text.d.ts +8 -0
- package/dist/system/reflection/boxed-text.js +31 -0
- package/dist/system/reflection/cast-to.d.ts +15 -0
- package/dist/system/reflection/cast-to.js +32 -0
- package/dist/system/reflection/constructor-descriptor.d.ts +11 -0
- package/dist/system/reflection/constructor-descriptor.js +22 -0
- package/dist/system/reflection/create-instance.d.ts +6 -0
- package/dist/system/reflection/create-instance.js +11 -0
- package/dist/system/reflection/decimal-type-defaults.d.ts +7 -0
- package/dist/system/reflection/decimal-type-defaults.js +17 -0
- package/dist/system/reflection/enum-from-raw.d.ts +14 -0
- package/dist/system/reflection/enum-from-raw.js +89 -0
- package/dist/system/reflection/enum-is-defined.d.ts +7 -0
- package/dist/system/reflection/enum-is-defined.js +14 -0
- package/dist/system/reflection/get-number-type.d.ts +7 -0
- package/dist/system/reflection/get-number-type.js +10 -0
- package/dist/system/reflection/get-runtime-type-from-type.d.ts +6 -0
- package/dist/system/reflection/get-runtime-type-from-type.js +22 -0
- package/dist/system/reflection/get-runtime-type.d.ts +3 -0
- package/dist/system/reflection/get-runtime-type.js +105 -0
- package/dist/system/reflection/implements-interface.d.ts +10 -0
- package/dist/system/reflection/implements-interface.js +26 -0
- package/dist/system/reflection/index.d.ts +27 -0
- package/dist/system/reflection/index.js +26 -0
- package/dist/system/reflection/invalid-cast.d.ts +8 -0
- package/dist/system/reflection/invalid-cast.js +33 -0
- package/dist/system/reflection/is-assignable-from.d.ts +13 -0
- package/dist/system/reflection/is-assignable-from.js +121 -0
- package/dist/system/reflection/is-box-of.d.ts +3 -0
- package/dist/system/reflection/is-box-of.js +5 -0
- package/dist/system/reflection/is-boxed.d.ts +7 -0
- package/dist/system/reflection/is-boxed.js +9 -0
- package/dist/system/reflection/is-type.d.ts +12 -0
- package/dist/system/reflection/is-type.js +20 -0
- package/dist/system/reflection/nullable-type.d.ts +3 -0
- package/dist/system/reflection/nullable-type.js +19 -0
- package/dist/system/reflection/opaque-type.d.ts +6 -0
- package/dist/system/reflection/opaque-type.js +22 -0
- package/dist/system/reflection/primitive-types.d.ts +20 -0
- package/dist/system/reflection/primitive-types.js +160 -0
- package/dist/system/reflection/runtime-type.d.ts +131 -0
- package/dist/system/reflection/runtime-type.js +5 -0
- package/dist/system/reflection/specialize-collection.d.ts +11 -0
- package/dist/system/reflection/specialize-collection.js +93 -0
- package/dist/system/reflection/specialize.d.ts +7 -0
- package/dist/system/reflection/specialize.js +33 -0
- package/dist/system/reflection/temporal-type-defaults.d.ts +11 -0
- package/dist/system/reflection/temporal-type-defaults.js +61 -0
- package/dist/system/reflection/temporal-types.d.ts +7 -0
- package/dist/system/reflection/temporal-types.js +44 -0
- package/dist/system/reflection/to-string-tag.d.ts +6 -0
- package/dist/system/reflection/to-string-tag.js +8 -0
- package/dist/system/reflection/tuple-type.d.ts +6 -0
- package/dist/system/reflection/tuple-type.js +23 -0
- package/dist/system/reflection/unbox-for-cast.d.ts +10 -0
- package/dist/system/reflection/unbox-for-cast.js +28 -0
- package/dist/system/reflection/unbox-for.d.ts +9 -0
- package/dist/system/reflection/unbox-for.js +15 -0
- package/dist/system/reflection/unbox.d.ts +5 -0
- package/dist/system/reflection/unbox.js +8 -0
- package/dist/system/reflection/unsupported-type.d.ts +7 -0
- package/dist/system/reflection/unsupported-type.js +27 -0
- package/dist/system/reflection/well-known-types.d.ts +13 -0
- package/dist/system/reflection/well-known-types.js +32 -0
- package/dist/system/reflection/with-implementers.d.ts +8 -0
- package/dist/system/reflection/with-implementers.js +23 -0
- package/dist/system/standard-numeric-format.d.ts +67 -0
- package/dist/system/standard-numeric-format.js +213 -0
- package/dist/system/string-members.d.ts +170 -0
- package/dist/system/string-members.js +445 -0
- package/dist/system/strings.d.ts +13 -9
- package/dist/system/strings.js +17 -18
- package/dist/system/temporal-helpers.d.ts +33 -0
- package/dist/system/temporal-helpers.js +117 -2
- package/dist/system/time-span-format.d.ts +3 -0
- package/dist/system/time-span-format.js +17 -0
- package/dist/system/time-span.d.ts +33 -0
- package/dist/system/time-span.js +90 -0
- package/dist/system/type-initializer.d.ts +14 -0
- package/dist/system/type-initializer.js +36 -0
- package/dist/system/uuid.d.ts +54 -38
- package/dist/system/uuid.js +120 -79
- package/dist/type-checking/primitive-type-checks.d.ts +17 -5
- package/dist/type-checking/primitive-type-checks.js +22 -15
- package/dist-unchecked/index.d.ts +2 -0
- package/dist-unchecked/index.js +2 -0
- package/dist-unchecked/system/argument-guards.d.ts +63 -0
- package/dist-unchecked/system/argument-guards.js +155 -0
- package/dist-unchecked/system/array-length.d.ts +6 -0
- package/dist-unchecked/system/array-length.js +17 -0
- package/dist-unchecked/system/big-integer.d.ts +50 -0
- package/dist-unchecked/system/big-integer.js +108 -0
- package/dist-unchecked/system/bind-receiver.d.ts +26 -0
- package/dist-unchecked/system/bind-receiver.js +30 -0
- package/dist-unchecked/system/boolean-format.d.ts +6 -0
- package/dist-unchecked/system/boolean-format.js +11 -0
- package/dist-unchecked/system/collections/builder-iterator.d.ts +14 -0
- package/dist-unchecked/system/collections/builder-iterator.js +15 -0
- package/dist-unchecked/system/collections/checks.d.ts +17 -0
- package/dist-unchecked/system/collections/checks.js +0 -0
- package/dist-unchecked/system/collections/close-collection.d.ts +33 -0
- package/dist-unchecked/system/collections/close-collection.js +68 -0
- package/dist-unchecked/system/collections/collection-type-name.d.ts +11 -0
- package/dist-unchecked/system/collections/collection-type-name.js +19 -0
- package/dist-unchecked/system/collections/concurrent-dictionary.d.ts +80 -0
- package/dist-unchecked/system/collections/concurrent-dictionary.js +261 -0
- package/dist-unchecked/system/collections/copy-to.d.ts +8 -0
- package/dist-unchecked/system/collections/copy-to.js +37 -0
- package/dist-unchecked/system/collections/default-comparer.d.ts +64 -0
- package/dist-unchecked/system/collections/default-comparer.js +231 -0
- package/dist-unchecked/system/collections/descriptors.d.ts +58 -0
- package/dist-unchecked/system/collections/descriptors.js +181 -0
- package/dist-unchecked/system/collections/dictionary-helpers.d.ts +15 -0
- package/dist-unchecked/system/collections/dictionary-helpers.js +17 -0
- package/dist-unchecked/system/collections/dictionary-views.d.ts +39 -0
- package/dist-unchecked/system/collections/dictionary-views.js +153 -0
- package/dist-unchecked/system/collections/dictionary.d.ts +68 -0
- package/dist-unchecked/system/collections/dictionary.js +164 -0
- package/dist-unchecked/system/collections/hash-core.d.ts +51 -0
- package/dist-unchecked/system/collections/hash-core.js +160 -0
- package/dist-unchecked/system/collections/hash-set.d.ts +56 -0
- package/dist-unchecked/system/collections/hash-set.js +165 -0
- package/dist-unchecked/system/collections/helpers.d.ts +29 -0
- package/dist-unchecked/system/collections/helpers.js +73 -0
- package/dist-unchecked/system/collections/immutable-array-builder.d.ts +37 -0
- package/dist-unchecked/system/collections/immutable-array-builder.js +117 -0
- package/dist-unchecked/system/collections/immutable-array.d.ts +74 -0
- package/dist-unchecked/system/collections/immutable-array.js +243 -0
- package/dist-unchecked/system/collections/immutable-dictionary-builder.d.ts +58 -0
- package/dist-unchecked/system/collections/immutable-dictionary-builder.js +125 -0
- package/dist-unchecked/system/collections/immutable-dictionary.d.ts +80 -0
- package/dist-unchecked/system/collections/immutable-dictionary.js +284 -0
- package/dist-unchecked/system/collections/immutable-hash-set-builder.d.ts +58 -0
- package/dist-unchecked/system/collections/immutable-hash-set-builder.js +124 -0
- package/dist-unchecked/system/collections/immutable-hash-set.d.ts +71 -0
- package/dist-unchecked/system/collections/immutable-hash-set.js +242 -0
- package/dist-unchecked/system/collections/immutable-interfaces.d.ts +51 -0
- package/dist-unchecked/system/collections/immutable-interfaces.js +0 -0
- package/dist-unchecked/system/collections/immutable-list-builder-core.d.ts +58 -0
- package/dist-unchecked/system/collections/immutable-list-builder-core.js +136 -0
- package/dist-unchecked/system/collections/immutable-list-builder.d.ts +35 -0
- package/dist-unchecked/system/collections/immutable-list-builder.js +72 -0
- package/dist-unchecked/system/collections/immutable-list-core.d.ts +98 -0
- package/dist-unchecked/system/collections/immutable-list-core.js +268 -0
- package/dist-unchecked/system/collections/immutable-list.d.ts +49 -0
- package/dist-unchecked/system/collections/immutable-list.js +176 -0
- package/dist-unchecked/system/collections/immutable-storage.d.ts +50 -0
- package/dist-unchecked/system/collections/immutable-storage.js +83 -0
- package/dist-unchecked/system/collections/index.d.ts +27 -0
- package/dist-unchecked/system/collections/index.js +24 -0
- package/dist-unchecked/system/collections/interfaces.d.ts +76 -0
- package/dist-unchecked/system/collections/interfaces.js +0 -0
- package/dist-unchecked/system/collections/list.d.ts +96 -0
- package/dist-unchecked/system/collections/list.js +332 -0
- package/dist-unchecked/system/collections/queue.d.ts +44 -0
- package/dist-unchecked/system/collections/queue.js +114 -0
- package/dist-unchecked/system/collections/read-only-list.d.ts +45 -0
- package/dist-unchecked/system/collections/read-only-list.js +152 -0
- package/dist-unchecked/system/collections/red-black-tree.d.ts +64 -0
- package/dist-unchecked/system/collections/red-black-tree.js +361 -0
- package/dist-unchecked/system/collections/set-algebra.d.ts +15 -0
- package/dist-unchecked/system/collections/set-algebra.js +58 -0
- package/dist-unchecked/system/collections/sorted-array.d.ts +14 -0
- package/dist-unchecked/system/collections/sorted-array.js +31 -0
- package/dist-unchecked/system/collections/sorted-dictionary.d.ts +64 -0
- package/dist-unchecked/system/collections/sorted-dictionary.js +161 -0
- package/dist-unchecked/system/collections/sorted-list.d.ts +131 -0
- package/dist-unchecked/system/collections/sorted-list.js +300 -0
- package/dist-unchecked/system/collections/sorted-set.d.ts +98 -0
- package/dist-unchecked/system/collections/sorted-set.js +253 -0
- package/dist-unchecked/system/collections/stack.d.ts +39 -0
- package/dist-unchecked/system/collections/stack.js +105 -0
- package/dist-unchecked/system/collections/throw-helpers.d.ts +77 -0
- package/dist-unchecked/system/collections/throw-helpers.js +158 -0
- package/dist-unchecked/system/date-time-offset.d.ts +23 -0
- package/dist-unchecked/system/date-time-offset.js +61 -0
- package/dist-unchecked/system/decimal-parsing.d.ts +18 -0
- package/dist-unchecked/system/decimal-parsing.js +74 -0
- package/dist-unchecked/system/decimal.d.ts +20 -0
- package/dist-unchecked/system/decimal.js +30 -0
- package/dist-unchecked/system/default-text.d.ts +11 -0
- package/dist-unchecked/system/default-text.js +52 -0
- package/dist-unchecked/system/delegates.d.ts +40 -0
- package/dist-unchecked/system/delegates.js +74 -0
- package/dist-unchecked/system/double-format.d.ts +20 -0
- package/dist-unchecked/system/double-format.js +171 -0
- package/dist-unchecked/system/dynamic-conversion.d.ts +37 -0
- package/dist-unchecked/system/dynamic-conversion.js +229 -0
- package/dist-unchecked/system/equality.d.ts +111 -0
- package/dist-unchecked/system/equality.js +392 -0
- package/dist-unchecked/system/exceptions/argument-exception.d.ts +17 -0
- package/dist-unchecked/system/exceptions/argument-exception.js +44 -0
- package/dist-unchecked/system/exceptions/argument-null-exception.d.ts +16 -0
- package/dist-unchecked/system/exceptions/argument-null-exception.js +35 -0
- package/dist-unchecked/system/exceptions/argument-out-of-range-exception.d.ts +18 -0
- package/dist-unchecked/system/exceptions/argument-out-of-range-exception.js +51 -0
- package/dist-unchecked/system/exceptions/arithmetic-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/arithmetic-exception.js +31 -0
- package/dist-unchecked/system/exceptions/divide-by-zero-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/divide-by-zero-exception.js +31 -0
- package/dist-unchecked/system/exceptions/exception.d.ts +38 -0
- package/dist-unchecked/system/exceptions/exception.js +77 -0
- package/dist-unchecked/system/exceptions/format-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/format-exception.js +31 -0
- package/dist-unchecked/system/exceptions/index-out-of-range-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/index-out-of-range-exception.js +31 -0
- package/dist-unchecked/system/exceptions/index.d.ts +26 -0
- package/dist-unchecked/system/exceptions/index.js +26 -0
- package/dist-unchecked/system/exceptions/invalid-cast-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/invalid-cast-exception.js +31 -0
- package/dist-unchecked/system/exceptions/invalid-operation-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/invalid-operation-exception.js +31 -0
- package/dist-unchecked/system/exceptions/json-exception.d.ts +18 -0
- package/dist-unchecked/system/exceptions/json-exception.js +39 -0
- package/dist-unchecked/system/exceptions/key-not-found-exception.d.ts +13 -0
- package/dist-unchecked/system/exceptions/key-not-found-exception.js +34 -0
- package/dist-unchecked/system/exceptions/message-value.d.ts +7 -0
- package/dist-unchecked/system/exceptions/message-value.js +9 -0
- package/dist-unchecked/system/exceptions/missing-method-exception.d.ts +19 -0
- package/dist-unchecked/system/exceptions/missing-method-exception.js +38 -0
- package/dist-unchecked/system/exceptions/named-exception.d.ts +7 -0
- package/dist-unchecked/system/exceptions/named-exception.js +29 -0
- package/dist-unchecked/system/exceptions/not-implemented-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/not-implemented-exception.js +31 -0
- package/dist-unchecked/system/exceptions/not-supported-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/not-supported-exception.js +31 -0
- package/dist-unchecked/system/exceptions/null-reference-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/null-reference-exception.js +31 -0
- package/dist-unchecked/system/exceptions/object-disposed-exception.d.ts +18 -0
- package/dist-unchecked/system/exceptions/object-disposed-exception.js +41 -0
- package/dist-unchecked/system/exceptions/operation-canceled-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/operation-canceled-exception.js +31 -0
- package/dist-unchecked/system/exceptions/overflow-exception.d.ts +15 -0
- package/dist-unchecked/system/exceptions/overflow-exception.js +34 -0
- package/dist-unchecked/system/exceptions/switch-expression-exception.d.ts +21 -0
- package/dist-unchecked/system/exceptions/switch-expression-exception.js +49 -0
- package/dist-unchecked/system/exceptions/system-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/system-exception.js +31 -0
- package/dist-unchecked/system/exceptions/task-canceled-exception.d.ts +13 -0
- package/dist-unchecked/system/exceptions/task-canceled-exception.js +34 -0
- package/dist-unchecked/system/exceptions/timeout-exception.d.ts +12 -0
- package/dist-unchecked/system/exceptions/timeout-exception.js +31 -0
- package/dist-unchecked/system/exceptions/to-exception.d.ts +25 -0
- package/dist-unchecked/system/exceptions/to-exception.js +53 -0
- package/dist-unchecked/system/exceptions/type-initialization-exception.d.ts +19 -0
- package/dist-unchecked/system/exceptions/type-initialization-exception.js +36 -0
- package/dist-unchecked/system/hash-code.d.ts +28 -0
- package/dist-unchecked/system/hash-code.js +179 -0
- package/dist-unchecked/system/identity-memo.d.ts +7 -0
- package/dist-unchecked/system/identity-memo.js +14 -0
- package/dist-unchecked/system/index.d.ts +35 -0
- package/dist-unchecked/system/index.js +35 -0
- package/dist-unchecked/system/int64-convert.d.ts +59 -0
- package/dist-unchecked/system/int64-convert.js +226 -0
- package/dist-unchecked/system/int64-format.d.ts +13 -0
- package/dist-unchecked/system/int64-format.js +28 -0
- package/dist-unchecked/system/int64-math.d.ts +56 -0
- package/dist-unchecked/system/int64-math.js +109 -0
- package/dist-unchecked/system/int64-parsing.d.ts +45 -0
- package/dist-unchecked/system/int64-parsing.js +153 -0
- package/dist-unchecked/system/int64.d.ts +134 -0
- package/dist-unchecked/system/int64.js +298 -0
- package/dist-unchecked/system/integer-division.d.ts +20 -0
- package/dist-unchecked/system/integer-division.js +17 -0
- package/dist-unchecked/system/integer-format.d.ts +12 -0
- package/dist-unchecked/system/integer-format.js +22 -0
- package/dist-unchecked/system/integer-standard-format.d.ts +9 -0
- package/dist-unchecked/system/integer-standard-format.js +66 -0
- package/dist-unchecked/system/json/byte-array-converter.d.ts +19 -0
- package/dist-unchecked/system/json/byte-array-converter.js +106 -0
- package/dist-unchecked/system/json/container-depth.d.ts +30 -0
- package/dist-unchecked/system/json/container-depth.js +84 -0
- package/dist-unchecked/system/json/contract-name.d.ts +15 -0
- package/dist-unchecked/system/json/contract-name.js +33 -0
- package/dist-unchecked/system/json/converter-set-cache.d.ts +17 -0
- package/dist-unchecked/system/json/converter-set-cache.js +26 -0
- package/dist-unchecked/system/json/converters.d.ts +52 -0
- package/dist-unchecked/system/json/converters.js +677 -0
- package/dist-unchecked/system/json/decimal-text.d.ts +9 -0
- package/dist-unchecked/system/json/decimal-text.js +125 -0
- package/dist-unchecked/system/json/dictionary-keys.d.ts +31 -0
- package/dist-unchecked/system/json/dictionary-keys.js +195 -0
- package/dist-unchecked/system/json/errors.d.ts +18 -0
- package/dist-unchecked/system/json/errors.js +18 -0
- package/dist-unchecked/system/json/exact-json-number.d.ts +103 -0
- package/dist-unchecked/system/json/exact-json-number.js +155 -0
- package/dist-unchecked/system/json/exact-number-reads.d.ts +21 -0
- package/dist-unchecked/system/json/exact-number-reads.js +104 -0
- package/dist-unchecked/system/json/index.d.ts +7 -0
- package/dist-unchecked/system/json/index.js +6 -0
- package/dist-unchecked/system/json/json-serializer.d.ts +102 -0
- package/dist-unchecked/system/json/json-serializer.js +114 -0
- package/dist-unchecked/system/json/json-text-reader.d.ts +33 -0
- package/dist-unchecked/system/json/json-text-reader.js +608 -0
- package/dist-unchecked/system/json/null-reads.d.ts +22 -0
- package/dist-unchecked/system/json/null-reads.js +43 -0
- package/dist-unchecked/system/json/number-from-string.d.ts +44 -0
- package/dist-unchecked/system/json/number-from-string.js +248 -0
- package/dist-unchecked/system/json/numeric-converters.d.ts +65 -0
- package/dist-unchecked/system/json/numeric-converters.js +361 -0
- package/dist-unchecked/system/json/numeric-enum-members.d.ts +18 -0
- package/dist-unchecked/system/json/numeric-enum-members.js +18 -0
- package/dist-unchecked/system/json/ordinal-ignore-case.d.ts +14 -0
- package/dist-unchecked/system/json/ordinal-ignore-case.js +60 -0
- package/dist-unchecked/system/json/polymorphism.d.ts +26 -0
- package/dist-unchecked/system/json/polymorphism.js +430 -0
- package/dist-unchecked/system/json/property-lookup.d.ts +17 -0
- package/dist-unchecked/system/json/property-lookup.js +32 -0
- package/dist-unchecked/system/json/property-naming-policy.d.ts +14 -0
- package/dist-unchecked/system/json/property-naming-policy.js +206 -0
- package/dist-unchecked/system/json/public-json-shape.d.ts +13 -0
- package/dist-unchecked/system/json/public-json-shape.js +38 -0
- package/dist-unchecked/system/json/serializer-context.d.ts +59 -0
- package/dist-unchecked/system/json/serializer-context.js +85 -0
- package/dist-unchecked/system/json/spec-kind.d.ts +3 -0
- package/dist-unchecked/system/json/spec-kind.js +4 -0
- package/dist-unchecked/system/json/temporal-reads.d.ts +15 -0
- package/dist-unchecked/system/json/temporal-reads.js +423 -0
- package/dist-unchecked/system/json/temporal-text.d.ts +16 -0
- package/dist-unchecked/system/json/temporal-text.js +32 -0
- package/dist-unchecked/system/json/types.d.ts +347 -0
- package/dist-unchecked/system/json/types.js +0 -0
- package/dist-unchecked/system/json/value-converter.d.ts +5 -0
- package/dist-unchecked/system/json/value-converter.js +0 -0
- package/dist-unchecked/system/lazy-value.d.ts +9 -0
- package/dist-unchecked/system/lazy-value.js +19 -0
- package/dist-unchecked/system/linq/compare-keys.d.ts +8 -0
- package/dist-unchecked/system/linq/compare-keys.js +37 -0
- package/dist-unchecked/system/linq/decimal-terminals.d.ts +24 -0
- package/dist-unchecked/system/linq/decimal-terminals.js +67 -0
- package/dist-unchecked/system/linq/expr-tree-visitor.d.ts +148 -0
- package/dist-unchecked/system/linq/expr-tree-visitor.js +479 -0
- package/dist-unchecked/system/linq/expr-tree.d.ts +166 -0
- package/dist-unchecked/system/linq/expr-tree.js +18 -0
- package/dist-unchecked/system/linq/index.d.ts +32 -0
- package/dist-unchecked/system/linq/index.js +27 -0
- package/dist-unchecked/system/linq/int64-terminals.d.ts +33 -0
- package/dist-unchecked/system/linq/int64-terminals.js +131 -0
- package/dist-unchecked/system/linq/linq.d.ts +107 -0
- package/dist-unchecked/system/linq/linq.js +46 -0
- package/dist-unchecked/system/linq/operators.d.ts +40 -0
- package/dist-unchecked/system/linq/operators.js +410 -0
- package/dist-unchecked/system/linq/terminals.d.ts +100 -0
- package/dist-unchecked/system/linq/terminals.js +467 -0
- package/dist-unchecked/system/linq/types.d.ts +330 -0
- package/dist-unchecked/system/linq/types.js +0 -0
- package/dist-unchecked/system/math.d.ts +55 -0
- package/dist-unchecked/system/math.js +141 -0
- package/dist-unchecked/system/number-parsing.d.ts +58 -0
- package/dist-unchecked/system/number-parsing.js +174 -0
- package/dist-unchecked/system/record-copy.d.ts +26 -0
- package/dist-unchecked/system/record-copy.js +72 -0
- package/dist-unchecked/system/reflection/box.d.ts +19 -0
- package/dist-unchecked/system/reflection/box.js +32 -0
- package/dist-unchecked/system/reflection/boxed-text.d.ts +8 -0
- package/dist-unchecked/system/reflection/boxed-text.js +31 -0
- package/dist-unchecked/system/reflection/cast-to.d.ts +15 -0
- package/dist-unchecked/system/reflection/cast-to.js +32 -0
- package/dist-unchecked/system/reflection/constructor-descriptor.d.ts +11 -0
- package/dist-unchecked/system/reflection/constructor-descriptor.js +22 -0
- package/dist-unchecked/system/reflection/create-instance.d.ts +6 -0
- package/dist-unchecked/system/reflection/create-instance.js +11 -0
- package/dist-unchecked/system/reflection/decimal-type-defaults.d.ts +7 -0
- package/dist-unchecked/system/reflection/decimal-type-defaults.js +17 -0
- package/dist-unchecked/system/reflection/enum-from-raw.d.ts +14 -0
- package/dist-unchecked/system/reflection/enum-from-raw.js +89 -0
- package/dist-unchecked/system/reflection/enum-is-defined.d.ts +7 -0
- package/dist-unchecked/system/reflection/enum-is-defined.js +14 -0
- package/dist-unchecked/system/reflection/get-number-type.d.ts +7 -0
- package/dist-unchecked/system/reflection/get-number-type.js +10 -0
- package/dist-unchecked/system/reflection/get-runtime-type-from-type.d.ts +6 -0
- package/dist-unchecked/system/reflection/get-runtime-type-from-type.js +22 -0
- package/dist-unchecked/system/reflection/get-runtime-type.d.ts +3 -0
- package/dist-unchecked/system/reflection/get-runtime-type.js +105 -0
- package/dist-unchecked/system/reflection/implements-interface.d.ts +10 -0
- package/dist-unchecked/system/reflection/implements-interface.js +26 -0
- package/dist-unchecked/system/reflection/index.d.ts +27 -0
- package/dist-unchecked/system/reflection/index.js +26 -0
- package/dist-unchecked/system/reflection/invalid-cast.d.ts +8 -0
- package/dist-unchecked/system/reflection/invalid-cast.js +33 -0
- package/dist-unchecked/system/reflection/is-assignable-from.d.ts +13 -0
- package/dist-unchecked/system/reflection/is-assignable-from.js +121 -0
- package/dist-unchecked/system/reflection/is-box-of.d.ts +3 -0
- package/dist-unchecked/system/reflection/is-box-of.js +5 -0
- package/dist-unchecked/system/reflection/is-boxed.d.ts +7 -0
- package/dist-unchecked/system/reflection/is-boxed.js +9 -0
- package/dist-unchecked/system/reflection/is-type.d.ts +12 -0
- package/dist-unchecked/system/reflection/is-type.js +20 -0
- package/dist-unchecked/system/reflection/nullable-type.d.ts +3 -0
- package/dist-unchecked/system/reflection/nullable-type.js +19 -0
- package/dist-unchecked/system/reflection/opaque-type.d.ts +6 -0
- package/dist-unchecked/system/reflection/opaque-type.js +22 -0
- package/dist-unchecked/system/reflection/primitive-types.d.ts +20 -0
- package/dist-unchecked/system/reflection/primitive-types.js +160 -0
- package/dist-unchecked/system/reflection/runtime-type.d.ts +131 -0
- package/dist-unchecked/system/reflection/runtime-type.js +5 -0
- package/dist-unchecked/system/reflection/specialize-collection.d.ts +11 -0
- package/dist-unchecked/system/reflection/specialize-collection.js +93 -0
- package/dist-unchecked/system/reflection/specialize.d.ts +7 -0
- package/dist-unchecked/system/reflection/specialize.js +33 -0
- package/dist-unchecked/system/reflection/temporal-type-defaults.d.ts +11 -0
- package/dist-unchecked/system/reflection/temporal-type-defaults.js +61 -0
- package/dist-unchecked/system/reflection/temporal-types.d.ts +7 -0
- package/dist-unchecked/system/reflection/temporal-types.js +44 -0
- package/dist-unchecked/system/reflection/to-string-tag.d.ts +6 -0
- package/dist-unchecked/system/reflection/to-string-tag.js +8 -0
- package/dist-unchecked/system/reflection/tuple-type.d.ts +6 -0
- package/dist-unchecked/system/reflection/tuple-type.js +23 -0
- package/dist-unchecked/system/reflection/unbox-for-cast.d.ts +10 -0
- package/dist-unchecked/system/reflection/unbox-for-cast.js +28 -0
- package/dist-unchecked/system/reflection/unbox-for.d.ts +9 -0
- package/dist-unchecked/system/reflection/unbox-for.js +15 -0
- package/dist-unchecked/system/reflection/unbox.d.ts +5 -0
- package/dist-unchecked/system/reflection/unbox.js +8 -0
- package/dist-unchecked/system/reflection/unsupported-type.d.ts +7 -0
- package/dist-unchecked/system/reflection/unsupported-type.js +27 -0
- package/dist-unchecked/system/reflection/well-known-types.d.ts +13 -0
- package/dist-unchecked/system/reflection/well-known-types.js +32 -0
- package/dist-unchecked/system/reflection/with-implementers.d.ts +8 -0
- package/dist-unchecked/system/reflection/with-implementers.js +23 -0
- package/dist-unchecked/system/standard-numeric-format.d.ts +67 -0
- package/dist-unchecked/system/standard-numeric-format.js +213 -0
- package/dist-unchecked/system/string-members.d.ts +170 -0
- package/dist-unchecked/system/string-members.js +445 -0
- package/dist-unchecked/system/strings.d.ts +42 -0
- package/dist-unchecked/system/strings.js +66 -0
- package/dist-unchecked/system/temporal-helpers.d.ts +43 -0
- package/dist-unchecked/system/temporal-helpers.js +127 -0
- package/dist-unchecked/system/time-span-format.d.ts +3 -0
- package/dist-unchecked/system/time-span-format.js +17 -0
- package/dist-unchecked/system/time-span.d.ts +33 -0
- package/dist-unchecked/system/time-span.js +90 -0
- package/dist-unchecked/system/type-initializer.d.ts +14 -0
- package/dist-unchecked/system/type-initializer.js +36 -0
- package/dist-unchecked/system/uuid.d.ts +68 -0
- package/dist-unchecked/system/uuid.js +124 -0
- package/dist-unchecked/type-checking/index.d.ts +1 -0
- package/dist-unchecked/type-checking/index.js +1 -0
- package/dist-unchecked/type-checking/primitive-type-checks.d.ts +45 -0
- package/dist-unchecked/type-checking/primitive-type-checks.js +81 -0
- package/package.json +88 -10
- package/src/index.ts +2 -0
- package/src/system/argument-guards.ts +253 -0
- package/src/system/array-length.ts +19 -0
- package/src/system/big-integer.ts +135 -0
- package/src/system/bind-receiver.ts +32 -0
- package/src/system/boolean-format.ts +13 -0
- package/src/system/collections/builder-iterator.ts +30 -0
- package/src/system/collections/checks.ts +18 -0
- package/src/system/collections/close-collection.ts +127 -0
- package/src/system/collections/collection-type-name.ts +37 -0
- package/src/system/collections/concurrent-dictionary.ts +396 -0
- package/src/system/collections/copy-to.ts +52 -0
- package/src/system/collections/default-comparer.ts +334 -0
- package/src/system/collections/descriptors.ts +310 -0
- package/src/system/collections/dictionary-helpers.ts +18 -0
- package/src/system/collections/dictionary-views.ts +231 -0
- package/src/system/collections/dictionary.ts +325 -0
- package/src/system/collections/hash-core.ts +232 -0
- package/src/system/collections/hash-set.ts +302 -0
- package/src/system/collections/helpers.ts +92 -0
- package/src/system/collections/immutable-array-builder.ts +160 -0
- package/src/system/collections/immutable-array.ts +352 -0
- package/src/system/collections/immutable-dictionary-builder.ts +238 -0
- package/src/system/collections/immutable-dictionary.ts +493 -0
- package/src/system/collections/immutable-hash-set-builder.ts +218 -0
- package/src/system/collections/immutable-hash-set.ts +362 -0
- package/src/system/collections/immutable-interfaces.ts +58 -0
- package/src/system/collections/immutable-list-builder-core.ts +204 -0
- package/src/system/collections/immutable-list-builder.ts +146 -0
- package/src/system/collections/immutable-list-core.ts +419 -0
- package/src/system/collections/immutable-list.ts +257 -0
- package/src/system/collections/immutable-storage.ts +107 -0
- package/src/system/collections/index.ts +27 -0
- package/src/system/collections/interfaces.ts +84 -0
- package/src/system/collections/list.ts +680 -0
- package/src/system/collections/queue.ts +240 -0
- package/src/system/collections/read-only-list.ts +210 -0
- package/src/system/collections/red-black-tree.ts +485 -0
- package/src/system/collections/set-algebra.ts +89 -0
- package/src/system/collections/sorted-array.ts +43 -0
- package/src/system/collections/sorted-dictionary.ts +322 -0
- package/src/system/collections/sorted-list.ts +566 -0
- package/src/system/collections/sorted-set.ts +483 -0
- package/src/system/collections/stack.ts +201 -0
- package/src/system/collections/throw-helpers.ts +240 -0
- package/src/system/date-time-offset.ts +102 -0
- package/src/system/decimal-parsing.ts +102 -0
- package/src/system/decimal.ts +36 -0
- package/src/system/default-text.ts +73 -0
- package/src/system/delegates.ts +83 -0
- package/src/system/double-format.ts +234 -0
- package/src/system/dynamic-conversion.ts +337 -0
- package/src/system/equality.ts +448 -0
- package/src/system/exceptions/argument-exception.ts +51 -0
- package/src/system/exceptions/argument-null-exception.ts +42 -0
- package/src/system/exceptions/argument-out-of-range-exception.ts +65 -0
- package/src/system/exceptions/arithmetic-exception.ts +37 -0
- package/src/system/exceptions/divide-by-zero-exception.ts +38 -0
- package/src/system/exceptions/exception.ts +91 -0
- package/src/system/exceptions/format-exception.ts +37 -0
- package/src/system/exceptions/index-out-of-range-exception.ts +38 -0
- package/src/system/exceptions/index.ts +26 -0
- package/src/system/exceptions/invalid-cast-exception.ts +38 -0
- package/src/system/exceptions/invalid-operation-exception.ts +39 -0
- package/src/system/exceptions/json-exception.ts +46 -0
- package/src/system/exceptions/key-not-found-exception.ts +42 -0
- package/src/system/exceptions/message-value.ts +9 -0
- package/src/system/exceptions/missing-method-exception.ts +45 -0
- package/src/system/exceptions/named-exception.ts +43 -0
- package/src/system/exceptions/not-implemented-exception.ts +38 -0
- package/src/system/exceptions/not-supported-exception.ts +38 -0
- package/src/system/exceptions/null-reference-exception.ts +38 -0
- package/src/system/exceptions/object-disposed-exception.ts +49 -0
- package/src/system/exceptions/operation-canceled-exception.ts +38 -0
- package/src/system/exceptions/overflow-exception.ts +40 -0
- package/src/system/exceptions/switch-expression-exception.ts +62 -0
- package/src/system/exceptions/system-exception.ts +37 -0
- package/src/system/exceptions/task-canceled-exception.ts +42 -0
- package/src/system/exceptions/timeout-exception.ts +37 -0
- package/src/system/exceptions/to-exception.ts +70 -0
- package/src/system/exceptions/type-initialization-exception.ts +42 -0
- package/src/system/hash-code.ts +202 -0
- package/src/system/identity-memo.ts +25 -0
- package/src/system/index.ts +35 -0
- package/src/system/int64-convert.ts +326 -0
- package/src/system/int64-format.ts +37 -0
- package/src/system/int64-math.ts +137 -0
- package/src/system/int64-parsing.ts +243 -0
- package/src/system/int64.ts +446 -0
- package/src/system/integer-division.ts +41 -0
- package/src/system/integer-format.ts +34 -0
- package/src/system/integer-standard-format.ts +103 -0
- package/src/system/json/byte-array-converter.ts +148 -0
- package/src/system/json/container-depth.ts +101 -0
- package/src/system/json/contract-name.ts +39 -0
- package/src/system/json/converter-set-cache.ts +55 -0
- package/src/system/json/converters.ts +1040 -0
- package/src/system/json/decimal-text.ts +174 -0
- package/src/system/json/dictionary-keys.ts +293 -0
- package/src/system/json/errors.ts +19 -0
- package/src/system/json/exact-json-number.ts +196 -0
- package/src/system/json/exact-number-reads.ts +136 -0
- package/src/system/json/index.ts +35 -0
- package/src/system/json/json-serializer.ts +259 -0
- package/src/system/json/json-text-reader.ts +799 -0
- package/src/system/json/null-reads.ts +47 -0
- package/src/system/json/number-from-string.ts +372 -0
- package/src/system/json/numeric-converters.ts +495 -0
- package/src/system/json/numeric-enum-members.ts +35 -0
- package/src/system/json/ordinal-ignore-case.ts +74 -0
- package/src/system/json/polymorphism.ts +650 -0
- package/src/system/json/property-lookup.ts +63 -0
- package/src/system/json/property-naming-policy.ts +258 -0
- package/src/system/json/public-json-shape.ts +43 -0
- package/src/system/json/serializer-context.ts +105 -0
- package/src/system/json/spec-kind.ts +6 -0
- package/src/system/json/temporal-reads.ts +606 -0
- package/src/system/json/temporal-text.ts +48 -0
- package/src/system/json/types.ts +433 -0
- package/src/system/json/value-converter.ts +5 -0
- package/src/system/lazy-value.ts +21 -0
- package/src/system/linq/compare-keys.ts +38 -0
- package/src/system/linq/decimal-terminals.ts +122 -0
- package/src/system/linq/expr-tree-visitor.ts +568 -0
- package/src/system/linq/expr-tree.ts +213 -0
- package/src/system/linq/index.ts +181 -0
- package/src/system/linq/int64-terminals.ts +199 -0
- package/src/system/linq/linq.ts +1816 -0
- package/src/system/linq/operators.ts +491 -0
- package/src/system/linq/terminals.ts +672 -0
- package/src/system/linq/types.ts +484 -0
- package/src/system/math.ts +182 -0
- package/src/system/number-parsing.ts +242 -0
- package/src/system/record-copy.ts +89 -0
- package/src/system/reflection/box.ts +38 -0
- package/src/system/reflection/boxed-text.ts +42 -0
- package/src/system/reflection/cast-to.ts +43 -0
- package/src/system/reflection/constructor-descriptor.ts +28 -0
- package/src/system/reflection/create-instance.ts +14 -0
- package/src/system/reflection/decimal-type-defaults.ts +20 -0
- package/src/system/reflection/enum-from-raw.ts +131 -0
- package/src/system/reflection/enum-is-defined.ts +18 -0
- package/src/system/reflection/get-number-type.ts +12 -0
- package/src/system/reflection/get-runtime-type-from-type.ts +33 -0
- package/src/system/reflection/get-runtime-type.ts +145 -0
- package/src/system/reflection/implements-interface.ts +40 -0
- package/src/system/reflection/index.ts +44 -0
- package/src/system/reflection/invalid-cast.ts +46 -0
- package/src/system/reflection/is-assignable-from.ts +161 -0
- package/src/system/reflection/is-box-of.ts +7 -0
- package/src/system/reflection/is-boxed.ts +17 -0
- package/src/system/reflection/is-type.ts +25 -0
- package/src/system/reflection/nullable-type.ts +27 -0
- package/src/system/reflection/opaque-type.ts +30 -0
- package/src/system/reflection/primitive-types.ts +197 -0
- package/src/system/reflection/runtime-type.ts +220 -0
- package/src/system/reflection/specialize-collection.ts +161 -0
- package/src/system/reflection/specialize.ts +52 -0
- package/src/system/reflection/temporal-type-defaults.ts +78 -0
- package/src/system/reflection/temporal-types.ts +57 -0
- package/src/system/reflection/to-string-tag.ts +8 -0
- package/src/system/reflection/tuple-type.ts +32 -0
- package/src/system/reflection/unbox-for-cast.ts +31 -0
- package/src/system/reflection/unbox-for.ts +19 -0
- package/src/system/reflection/unbox.ts +9 -0
- package/src/system/reflection/unsupported-type.ts +35 -0
- package/src/system/reflection/well-known-types.ts +50 -0
- package/src/system/reflection/with-implementers.ts +33 -0
- package/src/system/standard-numeric-format.ts +334 -0
- package/src/system/string-members.ts +641 -0
- package/src/system/strings.ts +83 -0
- package/src/system/temporal-helpers.ts +183 -0
- package/src/system/time-span-format.ts +21 -0
- package/src/system/time-span.ts +126 -0
- package/src/system/type-initializer.ts +41 -0
- package/src/system/uuid.ts +163 -0
- package/src/type-checking/index.ts +1 -0
- package/src/type-checking/primitive-type-checks.ts +113 -0
- package/dist/system/collections/immutable-collection.d.ts +0 -31
- package/dist/system/collections/immutable-collection.js +0 -58
- package/dist/system/collections/list-helpers.d.ts +0 -43
- package/dist/system/collections/list-helpers.js +0 -58
- package/dist/system/json/union-guard-registry.d.ts +0 -30
- package/dist/system/json/union-guard-registry.js +0 -34
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ArithmeticException } from "./arithmetic-exception.ts";
|
|
2
|
+
import type { ClassType } from "../reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
/** The message `new System.OverflowException()` carries on .NET. */
|
|
5
|
+
const OVERFLOW_EXCEPTION_MESSAGE = "Arithmetic operation resulted in an overflow.";
|
|
6
|
+
|
|
7
|
+
let OverflowException$rt: ClassType<OverflowException> | undefined;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Mirrors `System.OverflowException`: a checked conversion or operation whose
|
|
11
|
+
* result does not fit its integral type.
|
|
12
|
+
*/
|
|
13
|
+
export class OverflowException extends ArithmeticException {
|
|
14
|
+
override readonly name: string = "OverflowException";
|
|
15
|
+
|
|
16
|
+
constructor(message?: string | null, innerException?: Error | null) {
|
|
17
|
+
super(message ?? OVERFLOW_EXCEPTION_MESSAGE, innerException);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The runtime type descriptor of `System.OverflowException`: a data literal built on first read,
|
|
22
|
+
* so an unused class costs nothing and a thrown one pulls in no reflection code.
|
|
23
|
+
*/
|
|
24
|
+
static override get $runtimeType(): ClassType<OverflowException> {
|
|
25
|
+
return (OverflowException$rt ??= {
|
|
26
|
+
kind: "class",
|
|
27
|
+
name: "OverflowException",
|
|
28
|
+
fullName: "System.OverflowException",
|
|
29
|
+
namespace: "System",
|
|
30
|
+
ctor: OverflowException,
|
|
31
|
+
base: () => ArithmeticException.$runtimeType,
|
|
32
|
+
interfaces: [],
|
|
33
|
+
typeParameters: [],
|
|
34
|
+
isAbstract: false,
|
|
35
|
+
isValueType: false,
|
|
36
|
+
create: () => new OverflowException(),
|
|
37
|
+
test: (value: unknown): value is OverflowException => value instanceof OverflowException,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { InvalidOperationException } from "./invalid-operation-exception.ts";
|
|
2
|
+
import type { ClassType } from "../reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
/** The message of `System.Runtime.CompilerServices.SwitchExpressionException` on .NET. */
|
|
5
|
+
const SWITCH_EXPRESSION_EXCEPTION_MESSAGE =
|
|
6
|
+
"Non-exhaustive switch expression failed to match its input.";
|
|
7
|
+
|
|
8
|
+
let SwitchExpressionException$rt: ClassType<SwitchExpressionException> | undefined;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Mirrors `System.Runtime.CompilerServices.SwitchExpressionException`: a switch
|
|
12
|
+
* expression no arm matched. The unmatched value comes first, as in .NET's
|
|
13
|
+
* `SwitchExpressionException(unmatchedValue)` and like the other value-carrying
|
|
14
|
+
* classes (`ArgumentOutOfRangeException`); when it is not `null` the message
|
|
15
|
+
* names it on a new line as .NET does (`Unmatched value was 5.`, formatted with
|
|
16
|
+
* JavaScript's `String`).
|
|
17
|
+
*/
|
|
18
|
+
export class SwitchExpressionException extends InvalidOperationException {
|
|
19
|
+
override readonly name: string = "SwitchExpressionException";
|
|
20
|
+
readonly unmatchedValue: unknown;
|
|
21
|
+
|
|
22
|
+
constructor(unmatchedValue?: unknown, message?: string | null, innerException?: Error | null) {
|
|
23
|
+
super(
|
|
24
|
+
withUnmatchedValue(message ?? SWITCH_EXPRESSION_EXCEPTION_MESSAGE, unmatchedValue),
|
|
25
|
+
innerException,
|
|
26
|
+
);
|
|
27
|
+
this.unmatchedValue = unmatchedValue ?? null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
protected override get $typeNamespace(): string {
|
|
31
|
+
return "System.Runtime.CompilerServices";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The runtime type descriptor of `System.Runtime.CompilerServices.SwitchExpressionException`: a data literal built on first read,
|
|
36
|
+
* so an unused class costs nothing and a thrown one pulls in no reflection code.
|
|
37
|
+
*/
|
|
38
|
+
static override get $runtimeType(): ClassType<SwitchExpressionException> {
|
|
39
|
+
return (SwitchExpressionException$rt ??= {
|
|
40
|
+
kind: "class",
|
|
41
|
+
name: "SwitchExpressionException",
|
|
42
|
+
fullName: "System.Runtime.CompilerServices.SwitchExpressionException",
|
|
43
|
+
namespace: "System.Runtime.CompilerServices",
|
|
44
|
+
ctor: SwitchExpressionException,
|
|
45
|
+
base: () => InvalidOperationException.$runtimeType,
|
|
46
|
+
interfaces: [],
|
|
47
|
+
typeParameters: [],
|
|
48
|
+
isAbstract: false,
|
|
49
|
+
isValueType: false,
|
|
50
|
+
create: () => new SwitchExpressionException(),
|
|
51
|
+
test: (value: unknown): value is SwitchExpressionException =>
|
|
52
|
+
value instanceof SwitchExpressionException,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** `message` followed by .NET's `\nUnmatched value was <value>.` line when the value is not `null`. */
|
|
58
|
+
function withUnmatchedValue(message: string, unmatchedValue: unknown): string {
|
|
59
|
+
return unmatchedValue == null
|
|
60
|
+
? message
|
|
61
|
+
: `${message}\nUnmatched value was ${String(unmatchedValue)}.`;
|
|
62
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Exception } from "./exception.ts";
|
|
2
|
+
import type { ClassType } from "../reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
/** The message `new System.SystemException()` carries on .NET. */
|
|
5
|
+
const SYSTEM_EXCEPTION_MESSAGE = "System error.";
|
|
6
|
+
|
|
7
|
+
let SystemException$rt: ClassType<SystemException> | undefined;
|
|
8
|
+
|
|
9
|
+
/** Mirrors `System.SystemException`, the base of the exceptions the runtime raises itself. */
|
|
10
|
+
export class SystemException extends Exception {
|
|
11
|
+
override readonly name: string = "SystemException";
|
|
12
|
+
|
|
13
|
+
constructor(message?: string | null, innerException?: Error | null) {
|
|
14
|
+
super(message ?? SYSTEM_EXCEPTION_MESSAGE, innerException);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The runtime type descriptor of `System.SystemException`: a data literal built on first read,
|
|
19
|
+
* so an unused class costs nothing and a thrown one pulls in no reflection code.
|
|
20
|
+
*/
|
|
21
|
+
static override get $runtimeType(): ClassType<SystemException> {
|
|
22
|
+
return (SystemException$rt ??= {
|
|
23
|
+
kind: "class",
|
|
24
|
+
name: "SystemException",
|
|
25
|
+
fullName: "System.SystemException",
|
|
26
|
+
namespace: "System",
|
|
27
|
+
ctor: SystemException,
|
|
28
|
+
base: () => Exception.$runtimeType,
|
|
29
|
+
interfaces: [],
|
|
30
|
+
typeParameters: [],
|
|
31
|
+
isAbstract: false,
|
|
32
|
+
isValueType: false,
|
|
33
|
+
create: () => new SystemException(),
|
|
34
|
+
test: (value: unknown): value is SystemException => value instanceof SystemException,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OperationCanceledException } from "./operation-canceled-exception.ts";
|
|
2
|
+
import type { ClassType } from "../reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
/** The message `new System.Threading.Tasks.TaskCanceledException()` carries on .NET. */
|
|
5
|
+
const TASK_CANCELED_EXCEPTION_MESSAGE = "A task was canceled.";
|
|
6
|
+
|
|
7
|
+
let TaskCanceledException$rt: ClassType<TaskCanceledException> | undefined;
|
|
8
|
+
|
|
9
|
+
/** Mirrors `System.Threading.Tasks.TaskCanceledException`: a canceled task. */
|
|
10
|
+
export class TaskCanceledException extends OperationCanceledException {
|
|
11
|
+
override readonly name: string = "TaskCanceledException";
|
|
12
|
+
|
|
13
|
+
constructor(message?: string | null, innerException?: Error | null) {
|
|
14
|
+
super(message ?? TASK_CANCELED_EXCEPTION_MESSAGE, innerException);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
protected override get $typeNamespace(): string {
|
|
18
|
+
return "System.Threading.Tasks";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The runtime type descriptor of `System.Threading.Tasks.TaskCanceledException`: a data literal built on first read,
|
|
23
|
+
* so an unused class costs nothing and a thrown one pulls in no reflection code.
|
|
24
|
+
*/
|
|
25
|
+
static override get $runtimeType(): ClassType<TaskCanceledException> {
|
|
26
|
+
return (TaskCanceledException$rt ??= {
|
|
27
|
+
kind: "class",
|
|
28
|
+
name: "TaskCanceledException",
|
|
29
|
+
fullName: "System.Threading.Tasks.TaskCanceledException",
|
|
30
|
+
namespace: "System.Threading.Tasks",
|
|
31
|
+
ctor: TaskCanceledException,
|
|
32
|
+
base: () => OperationCanceledException.$runtimeType,
|
|
33
|
+
interfaces: [],
|
|
34
|
+
typeParameters: [],
|
|
35
|
+
isAbstract: false,
|
|
36
|
+
isValueType: false,
|
|
37
|
+
create: () => new TaskCanceledException(),
|
|
38
|
+
test: (value: unknown): value is TaskCanceledException =>
|
|
39
|
+
value instanceof TaskCanceledException,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SystemException } from "./system-exception.ts";
|
|
2
|
+
import type { ClassType } from "../reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
/** The message `new System.TimeoutException()` carries on .NET. */
|
|
5
|
+
const TIMEOUT_EXCEPTION_MESSAGE = "The operation has timed out.";
|
|
6
|
+
|
|
7
|
+
let TimeoutException$rt: ClassType<TimeoutException> | undefined;
|
|
8
|
+
|
|
9
|
+
/** Mirrors `System.TimeoutException`: an operation that did not finish in its allotted time. */
|
|
10
|
+
export class TimeoutException extends SystemException {
|
|
11
|
+
override readonly name: string = "TimeoutException";
|
|
12
|
+
|
|
13
|
+
constructor(message?: string | null, innerException?: Error | null) {
|
|
14
|
+
super(message ?? TIMEOUT_EXCEPTION_MESSAGE, innerException);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The runtime type descriptor of `System.TimeoutException`: a data literal built on first read,
|
|
19
|
+
* so an unused class costs nothing and a thrown one pulls in no reflection code.
|
|
20
|
+
*/
|
|
21
|
+
static override get $runtimeType(): ClassType<TimeoutException> {
|
|
22
|
+
return (TimeoutException$rt ??= {
|
|
23
|
+
kind: "class",
|
|
24
|
+
name: "TimeoutException",
|
|
25
|
+
fullName: "System.TimeoutException",
|
|
26
|
+
namespace: "System",
|
|
27
|
+
ctor: TimeoutException,
|
|
28
|
+
base: () => SystemException.$runtimeType,
|
|
29
|
+
interfaces: [],
|
|
30
|
+
typeParameters: [],
|
|
31
|
+
isAbstract: false,
|
|
32
|
+
isValueType: false,
|
|
33
|
+
create: () => new TimeoutException(),
|
|
34
|
+
test: (value: unknown): value is TimeoutException => value instanceof TimeoutException,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Exception } from "./exception.ts";
|
|
2
|
+
import { NullReferenceException } from "./null-reference-exception.ts";
|
|
3
|
+
import { TaskCanceledException } from "./task-canceled-exception.ts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The `name` of the `DOMException` a cancelled `fetch` (or any aborted signal)
|
|
7
|
+
* rejects with.
|
|
8
|
+
*/
|
|
9
|
+
const ABORT_ERROR_NAME = "AbortError";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Normalizes whatever a JavaScript `catch` caught to a `System.Exception`, as
|
|
13
|
+
* the typed clauses of a C# `try` see it:
|
|
14
|
+
* - an {@link Exception} passes through;
|
|
15
|
+
* - a `TypeError` (what a member access on `null` throws) becomes a
|
|
16
|
+
* {@link NullReferenceException};
|
|
17
|
+
* - an `AbortError` becomes a {@link TaskCanceledException};
|
|
18
|
+
* - any other `Error` (a `RangeError`, a `SyntaxError`, …) is wrapped in an
|
|
19
|
+
* {@link Exception};
|
|
20
|
+
* - any other thrown value becomes an {@link Exception} carrying its text.
|
|
21
|
+
*
|
|
22
|
+
* A wrapper keeps the original's `message` and `stack`, and holds the original
|
|
23
|
+
* as its `innerException` (`cause`). A `TypeError` thrown on purpose by
|
|
24
|
+
* third-party JavaScript is also reported as a `NullReferenceException`.
|
|
25
|
+
*/
|
|
26
|
+
export function toException(value: unknown): Exception {
|
|
27
|
+
if (value instanceof Exception) {
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (!(value instanceof Error)) {
|
|
32
|
+
return new Exception(String(value));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const wrapper = wrap(value);
|
|
36
|
+
|
|
37
|
+
if (value.stack !== undefined) {
|
|
38
|
+
wrapper.stack = value.stack;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return wrapper;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function wrap(error: Error): Exception {
|
|
45
|
+
if (error instanceof TypeError) {
|
|
46
|
+
return new NullReferenceException(error.message, error);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (error.name === ABORT_ERROR_NAME) {
|
|
50
|
+
return new TaskCanceledException(error.message, error);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return new Exception(error.message, error);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Runs a `when` filter of a `catch` clause. A filter that throws counts as
|
|
58
|
+
* `false`, as in C#: the exception is dropped and the next clause is tried.
|
|
59
|
+
* A filter that reads the clause's variable receives the caught value as its
|
|
60
|
+
* parameter.
|
|
61
|
+
*/
|
|
62
|
+
export function tryFilter(filter: () => boolean): boolean;
|
|
63
|
+
export function tryFilter<T>(filter: (value: T) => boolean, value: T): boolean;
|
|
64
|
+
export function tryFilter<T>(filter: (value: T) => boolean, value?: T): boolean {
|
|
65
|
+
try {
|
|
66
|
+
return filter(value as T);
|
|
67
|
+
} catch {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SystemException } from "./system-exception.ts";
|
|
2
|
+
import type { ClassType } from "../reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
let TypeInitializationException$rt: ClassType<TypeInitializationException> | undefined;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Mirrors `System.TypeInitializationException`: a type's static constructor (or one
|
|
8
|
+
* of its static field initializers) threw. The original exception is the inner
|
|
9
|
+
* exception (`cause`). `typeName` is the name .NET reports: the namespace-qualified
|
|
10
|
+
* metadata name of a top-level type (`MyApp.Pair\`1`, no type arguments), and only the
|
|
11
|
+
* metadata name of a nested type (`Inner`).
|
|
12
|
+
*/
|
|
13
|
+
export class TypeInitializationException extends SystemException {
|
|
14
|
+
override readonly name: string = "TypeInitializationException";
|
|
15
|
+
readonly typeName: string;
|
|
16
|
+
|
|
17
|
+
constructor(typeName: string, innerException?: Error | null) {
|
|
18
|
+
super(`The type initializer for '${typeName}' threw an exception.`, innerException);
|
|
19
|
+
this.typeName = typeName;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The runtime type descriptor of `System.TypeInitializationException`: a data literal built on first read,
|
|
24
|
+
* so an unused class costs nothing and a thrown one pulls in no reflection code.
|
|
25
|
+
*/
|
|
26
|
+
static override get $runtimeType(): ClassType<TypeInitializationException> {
|
|
27
|
+
return (TypeInitializationException$rt ??= {
|
|
28
|
+
kind: "class",
|
|
29
|
+
name: "TypeInitializationException",
|
|
30
|
+
fullName: "System.TypeInitializationException",
|
|
31
|
+
namespace: "System",
|
|
32
|
+
ctor: TypeInitializationException,
|
|
33
|
+
base: () => SystemException.$runtimeType,
|
|
34
|
+
interfaces: [],
|
|
35
|
+
typeParameters: [],
|
|
36
|
+
isAbstract: false,
|
|
37
|
+
isValueType: false,
|
|
38
|
+
test: (value: unknown): value is TypeInitializationException =>
|
|
39
|
+
value instanceof TypeInitializationException,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Port of System.HashCode from .NET (xxHash32-based).
|
|
3
|
+
* Used by Metano-generated record classes for value-based equality.
|
|
4
|
+
*
|
|
5
|
+
* Reference: https://github.com/dotnet/corert/blob/master/src/System.Private.CoreLib/shared/System/HashCode.cs
|
|
6
|
+
* Algorithm: xxHash32 by Yann Collet (BSD 2-Clause)
|
|
7
|
+
*/
|
|
8
|
+
import { hashInt64 } from "./int64.ts";
|
|
9
|
+
|
|
10
|
+
const Prime1 = 0x9e3779b1;
|
|
11
|
+
const Prime2 = 0x85ebca77;
|
|
12
|
+
const Prime3 = 0xc2b2ae3d;
|
|
13
|
+
const Prime4 = 0x27d4eb2f;
|
|
14
|
+
const Prime5 = 0x165667b1;
|
|
15
|
+
|
|
16
|
+
// Fixed seed (deterministic — no random seed like .NET since we need consistent hashing)
|
|
17
|
+
const Seed = 0;
|
|
18
|
+
|
|
19
|
+
function rotateLeft(value: number, count: number): number {
|
|
20
|
+
return (value << count) | (value >>> (32 - count)) | 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function round(hash: number, input: number): number {
|
|
24
|
+
hash = (hash + Math.imul(input, Prime2)) | 0;
|
|
25
|
+
hash = rotateLeft(hash, 13);
|
|
26
|
+
hash = Math.imul(hash, Prime1);
|
|
27
|
+
return hash;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function queueRound(hash: number, queuedValue: number): number {
|
|
31
|
+
hash = (hash + Math.imul(queuedValue, Prime3)) | 0;
|
|
32
|
+
hash = rotateLeft(hash, 17);
|
|
33
|
+
hash = Math.imul(hash, Prime4);
|
|
34
|
+
return hash;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function mixState(v1: number, v2: number, v3: number, v4: number): number {
|
|
38
|
+
const hash = rotateLeft(v1, 1) + rotateLeft(v2, 7) + rotateLeft(v3, 12) + rotateLeft(v4, 18);
|
|
39
|
+
return hash | 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function mixFinal(hash: number): number {
|
|
43
|
+
hash = (hash ^ (hash >>> 15)) | 0;
|
|
44
|
+
hash = Math.imul(hash, Prime2);
|
|
45
|
+
hash = (hash ^ (hash >>> 13)) | 0;
|
|
46
|
+
hash = Math.imul(hash, Prime3);
|
|
47
|
+
hash = (hash ^ (hash >>> 16)) | 0;
|
|
48
|
+
return hash;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function mixEmptyState(): number {
|
|
52
|
+
return (Seed + Prime5) | 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Computes a hash code for a single value.
|
|
57
|
+
*/
|
|
58
|
+
function hashValue(value: unknown): number {
|
|
59
|
+
if (value === null || value === undefined) return 0;
|
|
60
|
+
|
|
61
|
+
if (typeof value === "number") {
|
|
62
|
+
// For integers, use the value directly. For floats, use bit representation.
|
|
63
|
+
if (Number.isInteger(value)) return value | 0;
|
|
64
|
+
// Float: use DataView to get bit pattern
|
|
65
|
+
const buf = new ArrayBuffer(8);
|
|
66
|
+
new DataView(buf).setFloat64(0, value);
|
|
67
|
+
const dv = new DataView(buf);
|
|
68
|
+
return dv.getInt32(0) ^ dv.getInt32(4);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (typeof value === "string") {
|
|
72
|
+
let hash = 0;
|
|
73
|
+
for (let i = 0; i < value.length; i++) {
|
|
74
|
+
hash = Math.imul(hash, 31) + value.charCodeAt(i);
|
|
75
|
+
hash = hash | 0;
|
|
76
|
+
}
|
|
77
|
+
return hash;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (typeof value === "boolean") return value ? 1 : 0;
|
|
81
|
+
|
|
82
|
+
// 64-bit integers (and BigInteger): .NET folds both 32-bit words (FR-046).
|
|
83
|
+
if (typeof value === "bigint") return hashInt64(value);
|
|
84
|
+
|
|
85
|
+
// Objects with hashCode method (other Metano records)
|
|
86
|
+
if (
|
|
87
|
+
typeof value === "object" &&
|
|
88
|
+
value !== null &&
|
|
89
|
+
"hashCode" in value &&
|
|
90
|
+
typeof value.hashCode === "function"
|
|
91
|
+
) {
|
|
92
|
+
return (value as { hashCode(): number }).hashCode();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Accumulator for computing hash codes, modeled after System.HashCode.
|
|
100
|
+
*
|
|
101
|
+
* Usage:
|
|
102
|
+
* ```ts
|
|
103
|
+
* const hc = new HashCode();
|
|
104
|
+
* hc.add(this.x);
|
|
105
|
+
* hc.add(this.y);
|
|
106
|
+
* return hc.toHashCode();
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export class HashCode {
|
|
110
|
+
private _v1: number;
|
|
111
|
+
private _v2: number;
|
|
112
|
+
private _v3: number;
|
|
113
|
+
private _v4: number;
|
|
114
|
+
private _queue1 = 0;
|
|
115
|
+
private _queue2 = 0;
|
|
116
|
+
private _queue3 = 0;
|
|
117
|
+
private _length = 0;
|
|
118
|
+
|
|
119
|
+
constructor() {
|
|
120
|
+
this._v1 = (Seed + Prime1 + Prime2) | 0;
|
|
121
|
+
this._v2 = (Seed + Prime2) | 0;
|
|
122
|
+
this._v3 = Seed;
|
|
123
|
+
this._v4 = (Seed - Prime1) | 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
add(value: unknown): void {
|
|
127
|
+
const hc = hashValue(value);
|
|
128
|
+
const pos = this._length % 4;
|
|
129
|
+
this._length++;
|
|
130
|
+
|
|
131
|
+
switch (pos) {
|
|
132
|
+
case 0:
|
|
133
|
+
this._queue1 = hc;
|
|
134
|
+
break;
|
|
135
|
+
case 1:
|
|
136
|
+
this._queue2 = hc;
|
|
137
|
+
break;
|
|
138
|
+
case 2:
|
|
139
|
+
this._queue3 = hc;
|
|
140
|
+
break;
|
|
141
|
+
case 3:
|
|
142
|
+
this._v1 = round(this._v1, this._queue1);
|
|
143
|
+
this._v2 = round(this._v2, this._queue2);
|
|
144
|
+
this._v3 = round(this._v3, this._queue3);
|
|
145
|
+
this._v4 = round(this._v4, hc);
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
toHashCode(): number {
|
|
151
|
+
const length = this._length;
|
|
152
|
+
|
|
153
|
+
let hash: number;
|
|
154
|
+
if (length >= 4) {
|
|
155
|
+
hash = mixState(this._v1, this._v2, this._v3, this._v4);
|
|
156
|
+
} else {
|
|
157
|
+
hash = mixEmptyState();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
hash = (hash + length * 4) | 0;
|
|
161
|
+
|
|
162
|
+
const remaining = length % 4;
|
|
163
|
+
if (remaining >= 1) hash = queueRound(hash, this._queue1);
|
|
164
|
+
if (remaining >= 2) hash = queueRound(hash, this._queue2);
|
|
165
|
+
if (remaining >= 3) hash = queueRound(hash, this._queue3);
|
|
166
|
+
|
|
167
|
+
hash = mixFinal(hash);
|
|
168
|
+
return hash;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ─── Static combine helpers ───────────────────────────────
|
|
172
|
+
|
|
173
|
+
static combine(v1: unknown): number {
|
|
174
|
+
const hc = new HashCode();
|
|
175
|
+
hc.add(v1);
|
|
176
|
+
return hc.toHashCode();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
static combine2(v1: unknown, v2: unknown): number {
|
|
180
|
+
const hc = new HashCode();
|
|
181
|
+
hc.add(v1);
|
|
182
|
+
hc.add(v2);
|
|
183
|
+
return hc.toHashCode();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static combine3(v1: unknown, v2: unknown, v3: unknown): number {
|
|
187
|
+
const hc = new HashCode();
|
|
188
|
+
hc.add(v1);
|
|
189
|
+
hc.add(v2);
|
|
190
|
+
hc.add(v3);
|
|
191
|
+
return hc.toHashCode();
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
static combine4(v1: unknown, v2: unknown, v3: unknown, v4: unknown): number {
|
|
195
|
+
const hc = new HashCode();
|
|
196
|
+
hc.add(v1);
|
|
197
|
+
hc.add(v2);
|
|
198
|
+
hc.add(v3);
|
|
199
|
+
hc.add(v4);
|
|
200
|
+
return hc.toHashCode();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** A node of a trie keyed by object identity; the factories memoize on the arguments' identity. */
|
|
2
|
+
export interface MemoNode<R> {
|
|
3
|
+
children?: Map<object, MemoNode<R>>;
|
|
4
|
+
value?: R;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** The node for a key tuple under `root`, creating the path on first use. */
|
|
8
|
+
export function memoNodeFor<R>(root: MemoNode<R>, keys: ReadonlyArray<object>): MemoNode<R> {
|
|
9
|
+
return keys.reduce((node, key) => childOf(node, key), root);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function childOf<R>(node: MemoNode<R>, key: object): MemoNode<R> {
|
|
13
|
+
const children = (node.children ??= new Map());
|
|
14
|
+
const known = children.get(key);
|
|
15
|
+
|
|
16
|
+
if (known !== undefined) {
|
|
17
|
+
return known;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const created: MemoNode<R> = {};
|
|
21
|
+
|
|
22
|
+
children.set(key, created);
|
|
23
|
+
|
|
24
|
+
return created;
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from "./hash-code.ts";
|
|
2
|
+
export * from "./equality.ts";
|
|
3
|
+
export * from "./record-copy.ts";
|
|
4
|
+
export * from "./temporal-helpers.ts";
|
|
5
|
+
export * from "./time-span.ts";
|
|
6
|
+
export * from "./time-span-format.ts";
|
|
7
|
+
export * from "./date-time-offset.ts";
|
|
8
|
+
export * from "./collections/index.ts";
|
|
9
|
+
export * from "./linq/index.ts";
|
|
10
|
+
export * from "./json/index.ts";
|
|
11
|
+
export * from "./uuid.ts";
|
|
12
|
+
export * from "./delegates.ts";
|
|
13
|
+
export * from "./bind-receiver.ts";
|
|
14
|
+
export * from "./integer-division.ts";
|
|
15
|
+
export * from "./int64.ts";
|
|
16
|
+
export * from "./int64-math.ts";
|
|
17
|
+
export * from "./int64-format.ts";
|
|
18
|
+
export * from "./integer-format.ts";
|
|
19
|
+
export * from "./double-format.ts";
|
|
20
|
+
export * from "./boolean-format.ts";
|
|
21
|
+
export * from "./default-text.ts";
|
|
22
|
+
export * from "./int64-parsing.ts";
|
|
23
|
+
export * from "./int64-convert.ts";
|
|
24
|
+
export * from "./big-integer.ts";
|
|
25
|
+
export * from "./exceptions/index.ts";
|
|
26
|
+
export * from "./type-initializer.ts";
|
|
27
|
+
export * from "./math.ts";
|
|
28
|
+
export * from "./number-parsing.ts";
|
|
29
|
+
export * from "./strings.ts";
|
|
30
|
+
export * from "./string-members.ts";
|
|
31
|
+
export * from "./decimal-parsing.ts";
|
|
32
|
+
export * from "./array-length.ts";
|
|
33
|
+
export * from "./argument-guards.ts";
|
|
34
|
+
export * from "./reflection/index.ts";
|
|
35
|
+
export * from "./dynamic-conversion.ts";
|