@elaraai/east 0.0.1-beta.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/LICENSE.md +682 -0
- package/README.md +276 -0
- package/dist/src/analyze.d.ts +95 -0
- package/dist/src/analyze.d.ts.map +1 -0
- package/dist/src/analyze.js +1110 -0
- package/dist/src/analyze.js.map +1 -0
- package/dist/src/ast.d.ts +263 -0
- package/dist/src/ast.d.ts.map +1 -0
- package/dist/src/ast.js +151 -0
- package/dist/src/ast.js.map +1 -0
- package/dist/src/ast_to_ir.d.ts +24 -0
- package/dist/src/ast_to_ir.d.ts.map +1 -0
- package/dist/src/ast_to_ir.js +834 -0
- package/dist/src/ast_to_ir.js.map +1 -0
- package/dist/src/builtins.d.ts +18 -0
- package/dist/src/builtins.d.ts.map +1 -0
- package/dist/src/builtins.js +1105 -0
- package/dist/src/builtins.js.map +1 -0
- package/dist/src/comparison.d.ts +28 -0
- package/dist/src/comparison.d.ts.map +1 -0
- package/dist/src/comparison.js +1017 -0
- package/dist/src/comparison.js.map +1 -0
- package/dist/src/compile.d.ts +22 -0
- package/dist/src/compile.d.ts.map +1 -0
- package/dist/src/compile.js +3260 -0
- package/dist/src/compile.js.map +1 -0
- package/dist/src/containers/ref.d.ts +106 -0
- package/dist/src/containers/ref.d.ts.map +1 -0
- package/dist/src/containers/ref.js +100 -0
- package/dist/src/containers/ref.js.map +1 -0
- package/dist/src/containers/sortedmap.d.ts +165 -0
- package/dist/src/containers/sortedmap.d.ts.map +1 -0
- package/dist/src/containers/sortedmap.js +237 -0
- package/dist/src/containers/sortedmap.js.map +1 -0
- package/dist/src/containers/sortedset.d.ts +185 -0
- package/dist/src/containers/sortedset.d.ts.map +1 -0
- package/dist/src/containers/sortedset.js +312 -0
- package/dist/src/containers/sortedset.js.map +1 -0
- package/dist/src/containers/variant.d.ts +131 -0
- package/dist/src/containers/variant.d.ts.map +1 -0
- package/dist/src/containers/variant.js +68 -0
- package/dist/src/containers/variant.js.map +1 -0
- package/dist/src/datetime_format/parse.d.ts +50 -0
- package/dist/src/datetime_format/parse.d.ts.map +1 -0
- package/dist/src/datetime_format/parse.js +908 -0
- package/dist/src/datetime_format/parse.js.map +1 -0
- package/dist/src/datetime_format/print.d.ts +35 -0
- package/dist/src/datetime_format/print.d.ts.map +1 -0
- package/dist/src/datetime_format/print.js +157 -0
- package/dist/src/datetime_format/print.js.map +1 -0
- package/dist/src/datetime_format/tokenize.d.ts +76 -0
- package/dist/src/datetime_format/tokenize.d.ts.map +1 -0
- package/dist/src/datetime_format/tokenize.js +271 -0
- package/dist/src/datetime_format/tokenize.js.map +1 -0
- package/dist/src/datetime_format/types.d.ts +99 -0
- package/dist/src/datetime_format/types.d.ts.map +1 -0
- package/dist/src/datetime_format/types.js +103 -0
- package/dist/src/datetime_format/types.js.map +1 -0
- package/dist/src/datetime_format/validate.d.ts +51 -0
- package/dist/src/datetime_format/validate.d.ts.map +1 -0
- package/dist/src/datetime_format/validate.js +208 -0
- package/dist/src/datetime_format/validate.js.map +1 -0
- package/dist/src/default.d.ts +21 -0
- package/dist/src/default.d.ts.map +1 -0
- package/dist/src/default.js +82 -0
- package/dist/src/default.js.map +1 -0
- package/dist/src/eastir.d.ts +33 -0
- package/dist/src/eastir.d.ts.map +1 -0
- package/dist/src/eastir.js +92 -0
- package/dist/src/eastir.js.map +1 -0
- package/dist/src/error.d.ts +13 -0
- package/dist/src/error.d.ts.map +1 -0
- package/dist/src/error.js +8 -0
- package/dist/src/error.js.map +1 -0
- package/dist/src/expr/array.d.ts +1711 -0
- package/dist/src/expr/array.d.ts.map +1 -0
- package/dist/src/expr/array.js +1805 -0
- package/dist/src/expr/array.js.map +1 -0
- package/dist/src/expr/ast.d.ts +17 -0
- package/dist/src/expr/ast.d.ts.map +1 -0
- package/dist/src/expr/ast.js +302 -0
- package/dist/src/expr/ast.js.map +1 -0
- package/dist/src/expr/blob.d.ts +141 -0
- package/dist/src/expr/blob.d.ts.map +1 -0
- package/dist/src/expr/blob.js +198 -0
- package/dist/src/expr/blob.js.map +1 -0
- package/dist/src/expr/block.d.ts +201 -0
- package/dist/src/expr/block.d.ts.map +1 -0
- package/dist/src/expr/block.js +1505 -0
- package/dist/src/expr/block.js.map +1 -0
- package/dist/src/expr/boolean.d.ts +207 -0
- package/dist/src/expr/boolean.d.ts.map +1 -0
- package/dist/src/expr/boolean.js +261 -0
- package/dist/src/expr/boolean.js.map +1 -0
- package/dist/src/expr/datetime.d.ts +544 -0
- package/dist/src/expr/datetime.d.ts.map +1 -0
- package/dist/src/expr/datetime.js +980 -0
- package/dist/src/expr/datetime.js.map +1 -0
- package/dist/src/expr/dict.d.ts +1242 -0
- package/dist/src/expr/dict.d.ts.map +1 -0
- package/dist/src/expr/dict.js +1492 -0
- package/dist/src/expr/dict.js.map +1 -0
- package/dist/src/expr/expr.d.ts +95 -0
- package/dist/src/expr/expr.d.ts.map +1 -0
- package/dist/src/expr/expr.js +171 -0
- package/dist/src/expr/expr.js.map +1 -0
- package/dist/src/expr/float.d.ts +357 -0
- package/dist/src/expr/float.d.ts.map +1 -0
- package/dist/src/expr/float.js +637 -0
- package/dist/src/expr/float.js.map +1 -0
- package/dist/src/expr/function.d.ts +46 -0
- package/dist/src/expr/function.d.ts.map +1 -0
- package/dist/src/expr/function.js +58 -0
- package/dist/src/expr/function.js.map +1 -0
- package/dist/src/expr/index.d.ts +450 -0
- package/dist/src/expr/index.d.ts.map +1 -0
- package/dist/src/expr/index.js +423 -0
- package/dist/src/expr/index.js.map +1 -0
- package/dist/src/expr/integer.d.ts +256 -0
- package/dist/src/expr/integer.d.ts.map +1 -0
- package/dist/src/expr/integer.js +311 -0
- package/dist/src/expr/integer.js.map +1 -0
- package/dist/src/expr/libs/array.d.ts +106 -0
- package/dist/src/expr/libs/array.d.ts.map +1 -0
- package/dist/src/expr/libs/array.js +140 -0
- package/dist/src/expr/libs/array.js.map +1 -0
- package/dist/src/expr/libs/blob.d.ts +42 -0
- package/dist/src/expr/libs/blob.d.ts.map +1 -0
- package/dist/src/expr/libs/blob.js +70 -0
- package/dist/src/expr/libs/blob.js.map +1 -0
- package/dist/src/expr/libs/datetime.d.ts +479 -0
- package/dist/src/expr/libs/datetime.d.ts.map +1 -0
- package/dist/src/expr/libs/datetime.js +624 -0
- package/dist/src/expr/libs/datetime.js.map +1 -0
- package/dist/src/expr/libs/dict.d.ts +66 -0
- package/dist/src/expr/libs/dict.d.ts.map +1 -0
- package/dist/src/expr/libs/dict.js +77 -0
- package/dist/src/expr/libs/dict.js.map +1 -0
- package/dist/src/expr/libs/float.d.ts +299 -0
- package/dist/src/expr/libs/float.d.ts.map +1 -0
- package/dist/src/expr/libs/float.js +564 -0
- package/dist/src/expr/libs/float.js.map +1 -0
- package/dist/src/expr/libs/integer.d.ts +228 -0
- package/dist/src/expr/libs/integer.d.ts.map +1 -0
- package/dist/src/expr/libs/integer.js +398 -0
- package/dist/src/expr/libs/integer.js.map +1 -0
- package/dist/src/expr/libs/set.d.ts +59 -0
- package/dist/src/expr/libs/set.d.ts.map +1 -0
- package/dist/src/expr/libs/set.js +69 -0
- package/dist/src/expr/libs/set.js.map +1 -0
- package/dist/src/expr/libs/string.d.ts +71 -0
- package/dist/src/expr/libs/string.d.ts.map +1 -0
- package/dist/src/expr/libs/string.js +75 -0
- package/dist/src/expr/libs/string.js.map +1 -0
- package/dist/src/expr/never.d.ts +15 -0
- package/dist/src/expr/never.d.ts.map +1 -0
- package/dist/src/expr/never.js +12 -0
- package/dist/src/expr/never.js.map +1 -0
- package/dist/src/expr/null.d.ts +15 -0
- package/dist/src/expr/null.d.ts.map +1 -0
- package/dist/src/expr/null.js +12 -0
- package/dist/src/expr/null.js.map +1 -0
- package/dist/src/expr/ref.d.ts +103 -0
- package/dist/src/expr/ref.d.ts.map +1 -0
- package/dist/src/expr/ref.js +131 -0
- package/dist/src/expr/ref.js.map +1 -0
- package/dist/src/expr/regex_validation.d.ts +25 -0
- package/dist/src/expr/regex_validation.d.ts.map +1 -0
- package/dist/src/expr/regex_validation.js +130 -0
- package/dist/src/expr/regex_validation.js.map +1 -0
- package/dist/src/expr/set.d.ts +1071 -0
- package/dist/src/expr/set.d.ts.map +1 -0
- package/dist/src/expr/set.js +1137 -0
- package/dist/src/expr/set.js.map +1 -0
- package/dist/src/expr/string.d.ts +414 -0
- package/dist/src/expr/string.d.ts.map +1 -0
- package/dist/src/expr/string.js +683 -0
- package/dist/src/expr/string.js.map +1 -0
- package/dist/src/expr/struct.d.ts +48 -0
- package/dist/src/expr/struct.d.ts.map +1 -0
- package/dist/src/expr/struct.js +65 -0
- package/dist/src/expr/struct.js.map +1 -0
- package/dist/src/expr/types.d.ts +68 -0
- package/dist/src/expr/types.d.ts.map +1 -0
- package/dist/src/expr/types.js +6 -0
- package/dist/src/expr/types.js.map +1 -0
- package/dist/src/expr/variant.d.ts +137 -0
- package/dist/src/expr/variant.d.ts.map +1 -0
- package/dist/src/expr/variant.js +105 -0
- package/dist/src/expr/variant.js.map +1 -0
- package/dist/src/fuzz.d.ts +80 -0
- package/dist/src/fuzz.d.ts.map +1 -0
- package/dist/src/fuzz.js +300 -0
- package/dist/src/fuzz.js.map +1 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +21 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/internal.d.ts +36 -0
- package/dist/src/internal.d.ts.map +1 -0
- package/dist/src/internal.js +11 -0
- package/dist/src/internal.js.map +1 -0
- package/dist/src/ir.d.ts +1571 -0
- package/dist/src/ir.d.ts.map +1 -0
- package/dist/src/ir.js +56 -0
- package/dist/src/ir.js.map +1 -0
- package/dist/src/location.d.ts +48 -0
- package/dist/src/location.d.ts.map +1 -0
- package/dist/src/location.js +62 -0
- package/dist/src/location.js.map +1 -0
- package/dist/src/platform.d.ts +21 -0
- package/dist/src/platform.d.ts.map +1 -0
- package/dist/src/platform.js +8 -0
- package/dist/src/platform.js.map +1 -0
- package/dist/src/serialization/beast.d.ts +39 -0
- package/dist/src/serialization/beast.d.ts.map +1 -0
- package/dist/src/serialization/beast.js +555 -0
- package/dist/src/serialization/beast.js.map +1 -0
- package/dist/src/serialization/beast2-stream.d.ts +38 -0
- package/dist/src/serialization/beast2-stream.d.ts.map +1 -0
- package/dist/src/serialization/beast2-stream.js +665 -0
- package/dist/src/serialization/beast2-stream.js.map +1 -0
- package/dist/src/serialization/beast2.d.ts +41 -0
- package/dist/src/serialization/beast2.d.ts.map +1 -0
- package/dist/src/serialization/beast2.js +489 -0
- package/dist/src/serialization/beast2.js.map +1 -0
- package/dist/src/serialization/binary-utils.d.ts +151 -0
- package/dist/src/serialization/binary-utils.d.ts.map +1 -0
- package/dist/src/serialization/binary-utils.js +929 -0
- package/dist/src/serialization/binary-utils.js.map +1 -0
- package/dist/src/serialization/east.d.ts +84 -0
- package/dist/src/serialization/east.d.ts.map +1 -0
- package/dist/src/serialization/east.js +1802 -0
- package/dist/src/serialization/east.js.map +1 -0
- package/dist/src/serialization/index.d.ts +11 -0
- package/dist/src/serialization/index.d.ts.map +1 -0
- package/dist/src/serialization/index.js +12 -0
- package/dist/src/serialization/index.js.map +1 -0
- package/dist/src/serialization/json.d.ts +36 -0
- package/dist/src/serialization/json.d.ts.map +1 -0
- package/dist/src/serialization/json.js +849 -0
- package/dist/src/serialization/json.js.map +1 -0
- package/dist/src/type_of_type.d.ts +115 -0
- package/dist/src/type_of_type.d.ts.map +1 -0
- package/dist/src/type_of_type.js +362 -0
- package/dist/src/type_of_type.js.map +1 -0
- package/dist/src/types.d.ts +648 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1631 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ref } from "./containers/ref.js";
|
|
6
|
+
import { type variant, variant_symbol } from "./containers/variant.js";
|
|
7
|
+
/** Represents the Never type (bottom type) in East's type system. */
|
|
8
|
+
export type NeverType = {
|
|
9
|
+
type: "Never";
|
|
10
|
+
};
|
|
11
|
+
/** Singleton instance of the Never type. */
|
|
12
|
+
export declare const NeverType: NeverType;
|
|
13
|
+
/** Represents the Null type (unit type) in East's type system. */
|
|
14
|
+
export type NullType = {
|
|
15
|
+
type: "Null";
|
|
16
|
+
};
|
|
17
|
+
/** Singleton instance of the Null type. */
|
|
18
|
+
export declare const NullType: NullType;
|
|
19
|
+
/** Represents the Boolean type in East's type system. */
|
|
20
|
+
export type BooleanType = {
|
|
21
|
+
type: "Boolean";
|
|
22
|
+
};
|
|
23
|
+
/** Singleton instance of the Boolean type. */
|
|
24
|
+
export declare const BooleanType: BooleanType;
|
|
25
|
+
/** Represents the Integer type (arbitrary-precision integers) in East's type system. */
|
|
26
|
+
export type IntegerType = {
|
|
27
|
+
type: "Integer";
|
|
28
|
+
};
|
|
29
|
+
/** Singleton instance of the Integer type. */
|
|
30
|
+
export declare const IntegerType: IntegerType;
|
|
31
|
+
/** Represents the Float type (64-bit floating point) in East's type system. */
|
|
32
|
+
export type FloatType = {
|
|
33
|
+
type: "Float";
|
|
34
|
+
};
|
|
35
|
+
/** Singleton instance of the Float type. */
|
|
36
|
+
export declare const FloatType: FloatType;
|
|
37
|
+
/** Represents the String type in East's type system. */
|
|
38
|
+
export type StringType = {
|
|
39
|
+
type: "String";
|
|
40
|
+
};
|
|
41
|
+
/** Singleton instance of the String type. */
|
|
42
|
+
export declare const StringType: StringType;
|
|
43
|
+
/** Represents the DateTime type in East's type system. */
|
|
44
|
+
export type DateTimeType = {
|
|
45
|
+
type: "DateTime";
|
|
46
|
+
};
|
|
47
|
+
/** Singleton instance of the DateTime type. */
|
|
48
|
+
export declare const DateTimeType: DateTimeType;
|
|
49
|
+
/** Represents the Blob type (immutable binary data) in East's type system. */
|
|
50
|
+
export type BlobType = {
|
|
51
|
+
type: "Blob";
|
|
52
|
+
};
|
|
53
|
+
/** Singleton instance of the Blob type. */
|
|
54
|
+
export declare const BlobType: BlobType;
|
|
55
|
+
/**
|
|
56
|
+
* Represents a reference type in East's type system.
|
|
57
|
+
*
|
|
58
|
+
* Conceptually, a reference is a box or cell that can hold a value of a specified type.
|
|
59
|
+
* The reference can be mutated by updating the contents of the reference.
|
|
60
|
+
* Multiple references can point to the same underlying value.
|
|
61
|
+
*
|
|
62
|
+
* @typeParam T - The type of value held by the reference
|
|
63
|
+
*/
|
|
64
|
+
export type RefType<T = any> = {
|
|
65
|
+
type: "Ref";
|
|
66
|
+
value: T;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Constructs a reference (or cell) type with the specified element type.
|
|
70
|
+
*
|
|
71
|
+
* Conceptually, a reference is a box or cell that can hold a value of a specified type.
|
|
72
|
+
* The reference can be mutated by updating the contents of the reference.
|
|
73
|
+
* Multiple references can point to the same underlying value.
|
|
74
|
+
*
|
|
75
|
+
* @typeParam T - The type of value held by the reference
|
|
76
|
+
* @param type - The element type
|
|
77
|
+
* @returns A reference type
|
|
78
|
+
* @throws When the element type contains functions
|
|
79
|
+
*/
|
|
80
|
+
export declare function RefType<T>(type: T): RefType<T>;
|
|
81
|
+
/**
|
|
82
|
+
* Represents an Array type in East's type system.
|
|
83
|
+
*
|
|
84
|
+
* @typeParam T - The type of elements in the array
|
|
85
|
+
*/
|
|
86
|
+
export type ArrayType<T = any> = {
|
|
87
|
+
type: "Array";
|
|
88
|
+
value: T;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Constructs an Array type with the specified element type.
|
|
92
|
+
*
|
|
93
|
+
* @typeParam T - The type of elements in the array
|
|
94
|
+
* @param type - The element type
|
|
95
|
+
* @returns An Array type
|
|
96
|
+
* @throws When the element type contains functions
|
|
97
|
+
*/
|
|
98
|
+
export declare function ArrayType<T>(type: T): ArrayType<T>;
|
|
99
|
+
/**
|
|
100
|
+
* Represents a Set type in East's type system.
|
|
101
|
+
*
|
|
102
|
+
* @typeParam T - The type of keys in the set
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* Sets are mutable and sorted. Keys must be immutable types with a total ordering.
|
|
106
|
+
*/
|
|
107
|
+
export type SetType<T = any> = {
|
|
108
|
+
type: "Set";
|
|
109
|
+
key: T;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Constructs a Set type with the specified key type.
|
|
113
|
+
*
|
|
114
|
+
* @typeParam T - The type of keys in the set
|
|
115
|
+
* @param type - The key type
|
|
116
|
+
* @returns A Set type
|
|
117
|
+
* @throws When the key type is not immutable
|
|
118
|
+
*/
|
|
119
|
+
export declare function SetType<T>(type: T): SetType<T>;
|
|
120
|
+
/**
|
|
121
|
+
* Represents a Dict type in East's type system.
|
|
122
|
+
*
|
|
123
|
+
* @typeParam K - The type of keys in the dictionary
|
|
124
|
+
* @typeParam T - The type of values in the dictionary
|
|
125
|
+
*
|
|
126
|
+
* @remarks
|
|
127
|
+
* Dicts are mutable and sorted by key. Keys must be immutable types with a total ordering.
|
|
128
|
+
*/
|
|
129
|
+
export type DictType<K = any, T = any> = {
|
|
130
|
+
type: "Dict";
|
|
131
|
+
key: K;
|
|
132
|
+
value: T;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Constructs a Dict type with the specified key and value types.
|
|
136
|
+
*
|
|
137
|
+
* @typeParam K - The type of keys in the dictionary
|
|
138
|
+
* @typeParam T - The type of values in the dictionary
|
|
139
|
+
* @param key - The key type
|
|
140
|
+
* @param value - The value type
|
|
141
|
+
* @returns A Dict type
|
|
142
|
+
* @throws When the key type is not immutable or value type contains functions
|
|
143
|
+
*/
|
|
144
|
+
export declare function DictType<K, T>(key: K, value: T): DictType<K, T>;
|
|
145
|
+
/**
|
|
146
|
+
* Represents a Struct type (product type) in East's type system.
|
|
147
|
+
*
|
|
148
|
+
* @typeParam Fields - Object type mapping field names to their types
|
|
149
|
+
*
|
|
150
|
+
* @remarks
|
|
151
|
+
* Structs are immutable and field order is significant for structural typing.
|
|
152
|
+
*/
|
|
153
|
+
export type StructType<Fields extends {
|
|
154
|
+
[K in string]: any;
|
|
155
|
+
} = {
|
|
156
|
+
[K in string]: any;
|
|
157
|
+
}> = {
|
|
158
|
+
type: "Struct";
|
|
159
|
+
fields: Fields;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Constructs a Struct type with the specified field types.
|
|
163
|
+
*
|
|
164
|
+
* @typeParam Fields - Object type mapping field names to their types
|
|
165
|
+
* @param field_types - Object mapping field names to {@link EastType} instances
|
|
166
|
+
* @returns A Struct type
|
|
167
|
+
*/
|
|
168
|
+
export declare function StructType<Fields extends {
|
|
169
|
+
[K in string]: any;
|
|
170
|
+
}>(field_types: Fields): StructType<Fields>;
|
|
171
|
+
/**
|
|
172
|
+
* Represents a Variant type (sum type) in East's type system.
|
|
173
|
+
*
|
|
174
|
+
* @typeParam Cases - Object type mapping case names to their value types
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* Variants are immutable and cases are automatically sorted alphabetically by name.
|
|
178
|
+
*/
|
|
179
|
+
export type VariantType<Cases extends {
|
|
180
|
+
[K in string]: any;
|
|
181
|
+
} = {
|
|
182
|
+
[K in string]: any;
|
|
183
|
+
}> = {
|
|
184
|
+
type: "Variant";
|
|
185
|
+
cases: Cases;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Constructs a Variant type with the specified cases.
|
|
189
|
+
*
|
|
190
|
+
* @typeParam Cases - Object type mapping case names to their value types
|
|
191
|
+
* @param case_types - Object mapping case names to {@link EastType} instances
|
|
192
|
+
* @returns A Variant type with cases sorted alphabetically
|
|
193
|
+
*/
|
|
194
|
+
export declare function VariantType<Cases extends {
|
|
195
|
+
[K in string]: any;
|
|
196
|
+
}>(case_types: Cases): VariantType<Cases>;
|
|
197
|
+
export type RecursiveTypeMarker = {
|
|
198
|
+
type: "Recursive";
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Represents a recursive data type in East's type system.
|
|
202
|
+
*
|
|
203
|
+
* @typeParam T - the type of each node in the recursive structure
|
|
204
|
+
*
|
|
205
|
+
* @remarks
|
|
206
|
+
* Recursive data types can be used to represent tree-like structures or circular data structures.
|
|
207
|
+
* Only simple recursion (SCC size 1) is supported - nested RecursiveTypes with cross-references
|
|
208
|
+
* will throw an error during construction.
|
|
209
|
+
*/
|
|
210
|
+
export type RecursiveType<Node = any> = {
|
|
211
|
+
type: "Recursive";
|
|
212
|
+
node: Node;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Constructs a recursive type with the specified node structure.
|
|
216
|
+
*
|
|
217
|
+
* @typeParam F - Function type that defines the recursive structure
|
|
218
|
+
* @param f - Function that receives a self-reference marker and returns the node type
|
|
219
|
+
* @returns A RecursiveType representing the recursive structure
|
|
220
|
+
* @throws When the type contains functions or has SCC size > 1 (mutual recursion)
|
|
221
|
+
*
|
|
222
|
+
* @remarks
|
|
223
|
+
* The function `f` receives a `RecursiveTypeMarker` representing the recursive
|
|
224
|
+
* reference point. This marker should be used wherever the type recursively refers to itself.
|
|
225
|
+
*
|
|
226
|
+
* Only simple recursion is supported - the type can reference itself multiple times, but
|
|
227
|
+
* nested RecursiveTypes with cross-references (mutual recursion) are not allowed.
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts
|
|
231
|
+
* // Linked list
|
|
232
|
+
* const ListType = RecursiveType(self =>
|
|
233
|
+
* VariantType({
|
|
234
|
+
* nil: NullType,
|
|
235
|
+
* cons: StructType({ head: IntegerType, tail: self })
|
|
236
|
+
* })
|
|
237
|
+
* );
|
|
238
|
+
*
|
|
239
|
+
* // Binary tree
|
|
240
|
+
* const TreeType = RecursiveType(self =>
|
|
241
|
+
* StructType({
|
|
242
|
+
* value: IntegerType,
|
|
243
|
+
* left: OptionType(self),
|
|
244
|
+
* right: OptionType(self)
|
|
245
|
+
* })
|
|
246
|
+
* );
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
export declare function RecursiveType<F extends (self: RecursiveTypeMarker) => EastType>(f: F): RecursiveType<ReturnType<F>>;
|
|
250
|
+
/**
|
|
251
|
+
* Represents a Function type in East's type system.
|
|
252
|
+
*
|
|
253
|
+
* @typeParam I - Tuple type of input parameter types
|
|
254
|
+
* @typeParam O - The output/return type
|
|
255
|
+
*
|
|
256
|
+
* @remarks
|
|
257
|
+
* Functions are first-class values that can be serialized as IR but not as data.
|
|
258
|
+
* The `platforms` field tracks which platform functions are invoked by this function
|
|
259
|
+
* (transitively through any called functions), enabling effect tracking and async analysis.
|
|
260
|
+
*/
|
|
261
|
+
export type FunctionType<I extends any[] = any[], O extends any = any> = {
|
|
262
|
+
type: "Function";
|
|
263
|
+
inputs: I;
|
|
264
|
+
output: O;
|
|
265
|
+
platforms: string[] | null;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Constructs a Function type with the specified input and output types.
|
|
269
|
+
*
|
|
270
|
+
* @typeParam I - Tuple type of input parameter types
|
|
271
|
+
* @typeParam O - The output/return type
|
|
272
|
+
* @param inputs - Array of {@link EastType} instances for each parameter
|
|
273
|
+
* @param output - The {@link EastType} of the return value
|
|
274
|
+
* @returns A Function type
|
|
275
|
+
*/
|
|
276
|
+
export declare function FunctionType<const I extends any[], O extends any>(inputs: I, output: O, platforms: string[] | null): FunctionType<I, O>;
|
|
277
|
+
/**
|
|
278
|
+
* Union of all East types.
|
|
279
|
+
*
|
|
280
|
+
* @remarks
|
|
281
|
+
* This includes all primitive types, compound types, and function types.
|
|
282
|
+
*/
|
|
283
|
+
export type EastType = NeverType | NullType | BooleanType | IntegerType | FloatType | DateTimeType | StringType | BlobType | RefType | ArrayType | SetType | DictType | StructType | VariantType | RecursiveType | FunctionType;
|
|
284
|
+
/**
|
|
285
|
+
* Union of all East data types (excludes {@link FunctionType}).
|
|
286
|
+
*
|
|
287
|
+
* @remarks
|
|
288
|
+
* Data types can be fully serialized to JSON and transmitted between runtimes.
|
|
289
|
+
* Functions can be serialized as IR but not as pure data.
|
|
290
|
+
*/
|
|
291
|
+
export type DataType = NeverType | NullType | BooleanType | IntegerType | FloatType | DateTimeType | StringType | BlobType | RefType | ArrayType | SetType | DictType | StructType | VariantType | RecursiveType;
|
|
292
|
+
/**
|
|
293
|
+
* Union of all immutable East types.
|
|
294
|
+
*
|
|
295
|
+
* @remarks
|
|
296
|
+
* Immutable types can be used as dictionary keys and set elements.
|
|
297
|
+
* Excludes {@link RefType}, {@link ArrayType}, {@link SetType}, {@link DictType}, and {@link FunctionType}.
|
|
298
|
+
*/
|
|
299
|
+
export type ImmutableType = NeverType | NullType | BooleanType | IntegerType | FloatType | StringType | DateTimeType | BlobType | StructType | VariantType | RecursiveType;
|
|
300
|
+
/**
|
|
301
|
+
* Checks if a type is a pure data type (excludes functions).
|
|
302
|
+
*
|
|
303
|
+
* @param type - The {@link EastType} to check
|
|
304
|
+
* @param recursive_type - Internal parameter for tracking the current recursive type being checked
|
|
305
|
+
* @returns `true` if the type is a pure data type, `false` if it contains functions
|
|
306
|
+
*
|
|
307
|
+
* @remarks
|
|
308
|
+
* Data types can be fully serialized and transmitted between runtimes.
|
|
309
|
+
* This recursively checks {@link StructType}, {@link VariantType}, and {@link RecursiveType} fields.
|
|
310
|
+
*/
|
|
311
|
+
export declare function isDataType(type: EastType, recursive_type?: EastType): type is DataType;
|
|
312
|
+
/**
|
|
313
|
+
* Checks if a type is immutable (can be used as dict keys or set elements).
|
|
314
|
+
*
|
|
315
|
+
* @param type - The {@link EastType} to check
|
|
316
|
+
* @param recursive_type - Internal parameter for tracking the current recursive type being checked
|
|
317
|
+
* @returns `true` if the type is immutable, `false` if it contains mutable collections or functions
|
|
318
|
+
*
|
|
319
|
+
* @remarks
|
|
320
|
+
* Immutable types exclude {@link ArrayType}, {@link SetType}, {@link DictType}, and {@link FunctionType}.
|
|
321
|
+
* This recursively checks {@link StructType}, {@link VariantType}, and {@link RecursiveType} fields.
|
|
322
|
+
*/
|
|
323
|
+
export declare function isImmutableType(type: EastType, recursive_type?: EastType): type is ImmutableType;
|
|
324
|
+
/**
|
|
325
|
+
* Maps an East type to its corresponding TypeScript value type.
|
|
326
|
+
*
|
|
327
|
+
* @typeParam T - The {@link EastType} to convert
|
|
328
|
+
* @typeParam Node - Internal parameter for tracking the current recursive type node
|
|
329
|
+
* @typeParam Depth - Internal parameter for preventing infinite recursion in TypeScript
|
|
330
|
+
*
|
|
331
|
+
* @remarks
|
|
332
|
+
* This type-level function converts East types to their runtime TypeScript equivalents:
|
|
333
|
+
* - {@link IntegerType} → `bigint`
|
|
334
|
+
* - {@link RefType} → {@link ref} objects
|
|
335
|
+
* - {@link ArrayType} → JavaScript `Array`
|
|
336
|
+
* - {@link SetType} → JavaScript `Set`
|
|
337
|
+
* - {@link DictType} → JavaScript `Map`
|
|
338
|
+
* - {@link VariantType} → {@link variant} objects
|
|
339
|
+
* - {@link RecursiveType} → recursive JavaScript values (no wrapper)
|
|
340
|
+
* - {@link FunctionType} → JavaScript functions
|
|
341
|
+
*/
|
|
342
|
+
export type ValueTypeOf<T> = T extends NeverType ? never : T extends NullType ? null : T extends BooleanType ? boolean : T extends IntegerType ? bigint : T extends RefType<infer U> ? ref<ValueTypeOf<U>> : T extends FloatType ? number : T extends StringType ? string : T extends DateTimeType ? Date : T extends BlobType ? Uint8Array : T extends ArrayType<infer U> ? ValueTypeOf<U>[] : T extends SetType<infer U> ? Set<ValueTypeOf<U>> : T extends DictType<infer U, infer V> ? Map<ValueTypeOf<U>, ValueTypeOf<V>> : T extends StructType<infer U> ? keyof U extends never ? {
|
|
343
|
+
[K in never]: never;
|
|
344
|
+
} : {
|
|
345
|
+
[K in keyof U]: U[K] extends undefined ? never : ValueTypeOf<Exclude<U[K], undefined>>;
|
|
346
|
+
} : T extends VariantType<infer U> ? Exclude<{
|
|
347
|
+
[K in keyof U]: U[K] extends undefined ? never : {
|
|
348
|
+
type: K;
|
|
349
|
+
value: ValueTypeOf<Exclude<U[K], undefined>>;
|
|
350
|
+
[variant_symbol]: null;
|
|
351
|
+
};
|
|
352
|
+
}[keyof U], undefined> : T extends RecursiveType<infer U> ? ValueTypeOf<U> : T extends RecursiveTypeMarker ? any : T extends FunctionType<infer I, infer O> ? (...inputs: {
|
|
353
|
+
[K in keyof I]: ValueTypeOf<I[K]>;
|
|
354
|
+
}) => ValueTypeOf<O> : any;
|
|
355
|
+
/**
|
|
356
|
+
* Maps a TypeScript value type to its corresponding East type (type-level).
|
|
357
|
+
*
|
|
358
|
+
* @typeParam V - The TypeScript value type to convert
|
|
359
|
+
*
|
|
360
|
+
* @remarks
|
|
361
|
+
* This is the inverse of {@link ValueTypeOf} at the type level.
|
|
362
|
+
* Infers the East type from a TypeScript value type.
|
|
363
|
+
*/
|
|
364
|
+
export type EastTypeOf<V> = V extends never ? NeverType : V extends null ? NullType : V extends boolean ? BooleanType : V extends bigint ? IntegerType : V extends number ? FloatType : V extends string ? StringType : V extends Date ? DateTimeType : V extends Uint8Array ? BlobType : V extends ref<infer U> ? RefType<EastTypeOf<U>> : V extends Array<infer U> ? ArrayType<EastTypeOf<U>> : V extends Set<infer K> ? SetType<EastTypeOf<K>> : V extends Map<infer K, infer U> ? DictType<EastTypeOf<K>, EastTypeOf<U>> : V extends variant<infer Name, infer U> ? Name extends string ? VariantType<{
|
|
365
|
+
[K in Name]: EastTypeOf<U>;
|
|
366
|
+
}> : never : StructType<{
|
|
367
|
+
[K in keyof V]: EastTypeOf<V[K]>;
|
|
368
|
+
}>;
|
|
369
|
+
/**
|
|
370
|
+
* Infers the East type from a runtime JavaScript value.
|
|
371
|
+
*
|
|
372
|
+
* @typeParam V - The TypeScript type of the value
|
|
373
|
+
* @param value - The JavaScript value to analyze
|
|
374
|
+
* @returns The corresponding {@link EastType}
|
|
375
|
+
* @throws When the value is a JavaScript function or cannot be typed
|
|
376
|
+
*
|
|
377
|
+
* @remarks
|
|
378
|
+
* This is the runtime version of the {@link EastTypeOf} type.
|
|
379
|
+
* For arrays, it infers the element type from the first element.
|
|
380
|
+
*/
|
|
381
|
+
export declare function EastTypeOf<V>(value: V): EastTypeOf<V>;
|
|
382
|
+
/**
|
|
383
|
+
* Checks if two East types are structurally equal.
|
|
384
|
+
*
|
|
385
|
+
* @param t1 - First {@link EastType} to compare
|
|
386
|
+
* @param t2 - Second {@link EastType} to compare
|
|
387
|
+
* @param r1 - Internal parameter for tracking the first recursive type being compared
|
|
388
|
+
* @param r2 - Internal parameter for tracking the second recursive type being compared
|
|
389
|
+
* @returns `true` if the types are equal, `false` otherwise
|
|
390
|
+
*
|
|
391
|
+
* @remarks
|
|
392
|
+
* Performs structural equality checking, recursively comparing compound types.
|
|
393
|
+
* For {@link StructType} and {@link VariantType}, field/case order matters.
|
|
394
|
+
* For {@link RecursiveType}, uses cycle tracking to handle recursive references.
|
|
395
|
+
*/
|
|
396
|
+
export declare function isTypeEqual(t1: EastType, t2: EastType, r1?: EastType, r2?: EastType): boolean;
|
|
397
|
+
/**
|
|
398
|
+
* Checks if a JavaScript value conforms to an East type.
|
|
399
|
+
*
|
|
400
|
+
* @param value - The JavaScript value to check
|
|
401
|
+
* @param type - The {@link EastType} to validate against
|
|
402
|
+
* @param node_type - Internal parameter for tracking the current recursive type node
|
|
403
|
+
* @param nodes_visited - Internal parameter for tracking visited nodes to detect cycles
|
|
404
|
+
* @returns `true` if the value matches the type, `false` otherwise
|
|
405
|
+
*
|
|
406
|
+
* @remarks
|
|
407
|
+
* Performs runtime type checking, recursively validating compound types.
|
|
408
|
+
* Accepts both native JavaScript `Set`/`Map` and {@link SortedSet}/{@link SortedMap}.
|
|
409
|
+
* For {@link RecursiveType}, uses cycle detection to handle recursive values.
|
|
410
|
+
*/
|
|
411
|
+
export declare function isValueOf(value: any, type: EastType, node_type?: EastType, nodes_visited?: Set<any>): boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Converts an East type to its string representation.
|
|
414
|
+
*
|
|
415
|
+
* @param type - The {@link EastType} to print
|
|
416
|
+
* @param stack - Internal parameter for tracking recursive types
|
|
417
|
+
* @returns A human-readable string representation of the type
|
|
418
|
+
*
|
|
419
|
+
* @remarks
|
|
420
|
+
* Uses East's value syntax with leading dots (e.g., `.Integer`, `.Array .String`).
|
|
421
|
+
*/
|
|
422
|
+
export declare function printType(type: EastType, stack?: EastType[]): string;
|
|
423
|
+
/**
|
|
424
|
+
* Expands a {@link RecursiveType} one level deeper, replacing {@link RecursiveTypeMarker} with the node type.
|
|
425
|
+
*
|
|
426
|
+
* @typeParam T - The type to expand
|
|
427
|
+
* @typeParam NodeType - The recursive type to substitute for markers
|
|
428
|
+
*
|
|
429
|
+
* @remarks
|
|
430
|
+
* Used to unfold recursive types for head covariance while maintaining tail invariance.
|
|
431
|
+
* Internal helper for {@link SubType}.
|
|
432
|
+
*/
|
|
433
|
+
type ExpandOnce<T, NodeType> = T extends RefType<infer U> ? RefType<ExpandOnce<U, NodeType>> : T extends ArrayType<infer U> ? ArrayType<ExpandOnce<U, NodeType>> : T extends SetType<infer U> ? SetType<ExpandOnce<U, NodeType>> : T extends DictType<infer K, infer V> ? DictType<ExpandOnce<K, NodeType>, ExpandOnce<V, NodeType>> : T extends StructType<infer Fields> ? StructType<{
|
|
434
|
+
[K in keyof Fields]: ExpandOnce<Fields[K], NodeType>;
|
|
435
|
+
}> : T extends VariantType<infer Cases> ? VariantType<{
|
|
436
|
+
[K in keyof Cases]: ExpandOnce<Cases[K], NodeType>;
|
|
437
|
+
}> : T extends RecursiveTypeMarker ? NodeType : T;
|
|
438
|
+
/**
|
|
439
|
+
* Computes the subtype relationship for East types (type-level).
|
|
440
|
+
*
|
|
441
|
+
* @typeParam T - The {@link EastType} to compute subtypes for
|
|
442
|
+
*
|
|
443
|
+
* @remarks
|
|
444
|
+
* Subtyping rules:
|
|
445
|
+
* - {@link ArrayType}, {@link SetType}, {@link DictType} are invariant (mutable)
|
|
446
|
+
* - {@link StructType} is covariant in all fields
|
|
447
|
+
* - {@link VariantType} is covariant (subtypes can have fewer cases)
|
|
448
|
+
* - {@link FunctionType} is contravariant in inputs, covariant in output
|
|
449
|
+
* - {@link RecursiveType} allows head covariance with tail invariance (one level deep)
|
|
450
|
+
* - {@link NeverType} is a subtype of all types
|
|
451
|
+
*/
|
|
452
|
+
export type SubType<T> = T extends RecursiveType<infer U> ? RecursiveType<U> | ExpandOnce<SubType<U>, T> : T extends StructType<infer Fields> ? StructType<{
|
|
453
|
+
[K in keyof Fields]: SubType<Fields[K]>;
|
|
454
|
+
}> : T extends VariantType<infer Cases> ? VariantType<{
|
|
455
|
+
[K in keyof Cases]?: SubType<Cases[K]>;
|
|
456
|
+
}> : T extends FunctionType<infer I, infer O> ? FunctionType<I, SubType<O>> : T;
|
|
457
|
+
/**
|
|
458
|
+
* Checks if one East type is a subtype of another.
|
|
459
|
+
*
|
|
460
|
+
* @param t1 - The potential subtype
|
|
461
|
+
* @param t2 - The potential supertype
|
|
462
|
+
* @returns `true` if t1 is a subtype of t2, `false` otherwise
|
|
463
|
+
*
|
|
464
|
+
* @remarks
|
|
465
|
+
* Implements East's subtyping rules:
|
|
466
|
+
* - {@link NeverType} is a subtype of all types
|
|
467
|
+
* - Mutable collections ({@link ArrayType}, {@link SetType}, {@link DictType}) are invariant
|
|
468
|
+
* - {@link VariantType} supports width subtyping (more cases → fewer cases)
|
|
469
|
+
* - {@link FunctionType} uses contravariant inputs and covariant outputs
|
|
470
|
+
*/
|
|
471
|
+
export declare function isSubtype(t1: EastType, t2: EastType): boolean;
|
|
472
|
+
/**
|
|
473
|
+
* Computes the union of two East types (type-level).
|
|
474
|
+
*
|
|
475
|
+
* @typeParam T1 - First {@link EastType}
|
|
476
|
+
* @typeParam T2 - Second {@link EastType}
|
|
477
|
+
*
|
|
478
|
+
* @remarks
|
|
479
|
+
* Type union rules:
|
|
480
|
+
* - {@link NeverType} is the identity: `Union<Never, T> = T`
|
|
481
|
+
* - {@link StructType} unions require same fields, unions field types
|
|
482
|
+
* - {@link VariantType} unions combine all cases from both types
|
|
483
|
+
* - {@link FunctionType} unions intersect inputs (contravariant), union outputs (covariant)
|
|
484
|
+
* - Mutable collections must have identical element/key/value types
|
|
485
|
+
*/
|
|
486
|
+
export type TypeUnion<T1, T2> = T1 extends NeverType ? T2 : T2 extends NeverType ? T1 : T1 extends StructType<infer Fields1> ? T2 extends StructType<infer Fields2> ? StructType<{
|
|
487
|
+
[K in keyof Fields1 & keyof Fields2]: TypeUnion<Fields1[K], Fields2[K]>;
|
|
488
|
+
}> : never : T1 extends VariantType<infer Cases1> ? T2 extends VariantType<infer Cases2> ? VariantType<{
|
|
489
|
+
[K in Exclude<keyof Cases1, keyof Cases2>]: Cases1[K];
|
|
490
|
+
} & {
|
|
491
|
+
[K in Exclude<keyof Cases2, keyof Cases1>]: Cases2[K];
|
|
492
|
+
} & {
|
|
493
|
+
[K in keyof Cases1 & keyof Cases2]: TypeUnion<Cases1[K], Cases2[K]>;
|
|
494
|
+
}> : never : T1 extends FunctionType<infer I1, infer O1> ? T2 extends FunctionType<infer I2, infer O2> ? FunctionType<{
|
|
495
|
+
[K in keyof I1 & keyof I2]: TypeIntersect<I1[K], I2[K]>;
|
|
496
|
+
}, TypeUnion<O1, O2>> : never : T1 extends T2 ? T1 : never;
|
|
497
|
+
/**
|
|
498
|
+
* Computes the intersection of two East types (type-level).
|
|
499
|
+
*
|
|
500
|
+
* @typeParam T1 - First {@link EastType}
|
|
501
|
+
* @typeParam T2 - Second {@link EastType}
|
|
502
|
+
*
|
|
503
|
+
* @remarks
|
|
504
|
+
* Type intersection rules:
|
|
505
|
+
* - {@link NeverType} is absorbing: `Intersect<Never, T> = Never`
|
|
506
|
+
* - {@link StructType} intersections require same fields, intersect field types
|
|
507
|
+
* - {@link VariantType} intersections keep only common cases
|
|
508
|
+
* - {@link FunctionType} intersections union inputs (contravariant), intersect outputs (covariant)
|
|
509
|
+
* - Mutable collections must have identical element/key/value types
|
|
510
|
+
*/
|
|
511
|
+
export type TypeIntersect<T1, T2> = T1 extends NeverType ? NeverType : T2 extends NeverType ? NeverType : T1 extends StructType<infer Fields1> ? T2 extends StructType<infer Fields2> ? StructType<{
|
|
512
|
+
[K in keyof Fields1 & keyof Fields2]: TypeIntersect<Fields1[K], Fields2[K]>;
|
|
513
|
+
}> : never : T1 extends VariantType<infer Cases1> ? T2 extends VariantType<infer Cases2> ? VariantType<{
|
|
514
|
+
[K in keyof Cases1 & keyof Cases2]: TypeIntersect<Cases1[K], Cases2[K]>;
|
|
515
|
+
}> : never : T1 extends FunctionType<infer I1, infer O1> ? T2 extends FunctionType<infer I2, infer O2> ? FunctionType<{
|
|
516
|
+
[K in keyof I1 & keyof I2]: TypeUnion<I1[K], I2[K]>;
|
|
517
|
+
}, TypeIntersect<O1, O2>> : never : T1 extends T2 ? T1 : never;
|
|
518
|
+
/**
|
|
519
|
+
* Computes the union of two East types at runtime.
|
|
520
|
+
*
|
|
521
|
+
* @typeParam T1 - First {@link EastType}
|
|
522
|
+
* @typeParam T2 - Second {@link EastType}
|
|
523
|
+
* @param t1 - First type
|
|
524
|
+
* @param t2 - Second type
|
|
525
|
+
* @returns The union type
|
|
526
|
+
* @throws {TypeMismatchError} When the types cannot be unified
|
|
527
|
+
*
|
|
528
|
+
* @remarks
|
|
529
|
+
* This is the runtime version of the {@link TypeUnion} type.
|
|
530
|
+
* Error messages include the full type path for debugging.
|
|
531
|
+
*/
|
|
532
|
+
export declare function TypeUnion<T1 extends EastType, T2 extends EastType>(t1: T1, t2: T2): TypeUnion<T1, T2>;
|
|
533
|
+
/**
|
|
534
|
+
* Computes the intersection of two East types at runtime.
|
|
535
|
+
*
|
|
536
|
+
* @typeParam T1 - First {@link EastType}
|
|
537
|
+
* @typeParam T2 - Second {@link EastType}
|
|
538
|
+
* @param t1 - First type
|
|
539
|
+
* @param t2 - Second type
|
|
540
|
+
* @returns The intersection type
|
|
541
|
+
* @throws {TypeMismatchError} When the types cannot be intersected
|
|
542
|
+
*
|
|
543
|
+
* @remarks
|
|
544
|
+
* This is the runtime version of the {@link TypeIntersect} type.
|
|
545
|
+
* For {@link VariantType}, returns {@link NeverType} if no common cases exist.
|
|
546
|
+
*/
|
|
547
|
+
export declare function TypeIntersect<T1 extends EastType, T2 extends EastType>(t1: T1, t2: T2): TypeIntersect<T1, T2>;
|
|
548
|
+
/**
|
|
549
|
+
* Asserts that two East types are equal, returning the first type.
|
|
550
|
+
*
|
|
551
|
+
* @typeParam T1 - First {@link EastType}
|
|
552
|
+
* @typeParam T2 - Second {@link EastType}
|
|
553
|
+
* @param t1 - First type
|
|
554
|
+
* @param t2 - Second type
|
|
555
|
+
* @param r1 - Internal parameter for tracking the first recursive type being compared
|
|
556
|
+
* @param r2 - Internal parameter for tracking the second recursive type being compared
|
|
557
|
+
* @returns The first type if types are equal
|
|
558
|
+
* @throws {TypeMismatchError} When the types are not equal
|
|
559
|
+
*
|
|
560
|
+
* @remarks
|
|
561
|
+
* This function recursively validates type equality and throws detailed errors
|
|
562
|
+
* on mismatch. Used to enforce type constraints in compound type constructors.
|
|
563
|
+
* Unlike {@link isTypeEqual}, this throws rather than returning a boolean.
|
|
564
|
+
*/
|
|
565
|
+
export declare function TypeEqual<T1 extends EastType, T2 extends EastType>(t1: T1, t2: T2, r1?: any, r2?: any): T1;
|
|
566
|
+
/**
|
|
567
|
+
* Create a type wide enough to hold values from two East types at runtime.
|
|
568
|
+
*
|
|
569
|
+
* @param t1 - First type
|
|
570
|
+
* @param t2 - Second type
|
|
571
|
+
* @returns The union type
|
|
572
|
+
* @throws {TypeMismatchError} When the types cannot be unified
|
|
573
|
+
*
|
|
574
|
+
* @remarks
|
|
575
|
+
* This is a more forgiving version of the {@link TypeUnion} type, designed for inferring types from values.
|
|
576
|
+
* Functions and recursive types are not supported.
|
|
577
|
+
* Error messages include the full type path for debugging.
|
|
578
|
+
*/
|
|
579
|
+
export declare function TypeWiden(t1: EastType, t2: EastType): EastType;
|
|
580
|
+
/**
|
|
581
|
+
* Formats an identifier for display in type strings.
|
|
582
|
+
*
|
|
583
|
+
* @param x - The identifier to format
|
|
584
|
+
* @returns The identifier, escaped with backticks if it contains special characters
|
|
585
|
+
*
|
|
586
|
+
* @remarks
|
|
587
|
+
* Used by {@link printType} to format field and case names.
|
|
588
|
+
* Identifiers matching `/^[a-zA-Z_][a-zA-Z0-9_]*$/` are returned as-is,
|
|
589
|
+
* others are wrapped in backticks with escaping.
|
|
590
|
+
*/
|
|
591
|
+
export declare function printIdentifier(x: string): string;
|
|
592
|
+
/**
|
|
593
|
+
* Represents the None case of the {@link OptionType} pattern.
|
|
594
|
+
*
|
|
595
|
+
* @remarks
|
|
596
|
+
* Equivalent to `VariantType({ none: NullType })`.
|
|
597
|
+
* Use with {@link SomeType} and {@link OptionType} for optional values.
|
|
598
|
+
*/
|
|
599
|
+
export type NoneType = VariantType<{
|
|
600
|
+
none: NullType;
|
|
601
|
+
}>;
|
|
602
|
+
/** Singleton instance of {@link NoneType}. */
|
|
603
|
+
export declare const NoneType: NoneType;
|
|
604
|
+
/**
|
|
605
|
+
* Represents the Some case of the {@link OptionType} pattern.
|
|
606
|
+
*
|
|
607
|
+
* @typeParam T - The type of the wrapped value
|
|
608
|
+
*/
|
|
609
|
+
export type SomeType<T> = VariantType<{
|
|
610
|
+
some: T;
|
|
611
|
+
}>;
|
|
612
|
+
/**
|
|
613
|
+
* Constructs a Some type wrapping a value type.
|
|
614
|
+
*
|
|
615
|
+
* @typeParam T - The type of the wrapped value
|
|
616
|
+
* @param type - The {@link EastType} to wrap
|
|
617
|
+
* @returns A SomeType variant
|
|
618
|
+
*/
|
|
619
|
+
export declare function SomeType<T>(type: T): SomeType<T>;
|
|
620
|
+
/**
|
|
621
|
+
* Represents an optional value that may be present or absent.
|
|
622
|
+
*
|
|
623
|
+
* @typeParam T - The type of the value when present
|
|
624
|
+
*
|
|
625
|
+
* @remarks
|
|
626
|
+
* This is East's type-level representation of the {@link option} runtime pattern.
|
|
627
|
+
* Equivalent to `VariantType({ none: NullType, some: T })`.
|
|
628
|
+
*/
|
|
629
|
+
export type OptionType<T> = VariantType<{
|
|
630
|
+
none: NullType;
|
|
631
|
+
some: T;
|
|
632
|
+
}>;
|
|
633
|
+
/**
|
|
634
|
+
* Constructs an Option type for optional values.
|
|
635
|
+
*
|
|
636
|
+
* @typeParam T - The type of the value when present
|
|
637
|
+
* @param type - The {@link EastType} of the wrapped value
|
|
638
|
+
* @returns An OptionType variant with none and some cases
|
|
639
|
+
*
|
|
640
|
+
* @example
|
|
641
|
+
* ```ts
|
|
642
|
+
* const maybeInt = OptionType(IntegerType);
|
|
643
|
+
* // Type: VariantType<{ none: NullType, some: IntegerType }>
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
export declare function OptionType<T>(type: T): OptionType<T>;
|
|
647
|
+
export {};
|
|
648
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAS,KAAK,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,KAAK,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAgBvE,qEAAqE;AACrE,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAC1C,4CAA4C;AAC5C,eAAO,MAAM,SAAS,EAAE,SAA6B,CAAC;AAEtD,kEAAkE;AAClE,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACxC,2CAA2C;AAC3C,eAAO,MAAM,QAAQ,EAAE,QAA2B,CAAC;AAEnD,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAC9C,8CAA8C;AAC9C,eAAO,MAAM,WAAW,EAAE,WAAiC,CAAC;AAE5D,wFAAwF;AACxF,MAAM,MA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