@elaraai/east 1.0.80 → 1.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/builtins.d.ts +1 -1
- package/dist/src/builtins.d.ts.map +1 -1
- package/dist/src/builtins.js +19 -0
- package/dist/src/builtins.js.map +1 -1
- package/dist/src/codegen/spellings.d.ts.map +1 -1
- package/dist/src/codegen/spellings.js +3 -0
- package/dist/src/codegen/spellings.js.map +1 -1
- package/dist/src/comparison.d.ts +54 -0
- package/dist/src/comparison.d.ts.map +1 -1
- package/dist/src/comparison.equivalent.spec.d.ts +6 -0
- package/dist/src/comparison.equivalent.spec.d.ts.map +1 -0
- package/dist/src/comparison.equivalent.spec.js +130 -0
- package/dist/src/comparison.equivalent.spec.js.map +1 -0
- package/dist/src/comparison.js +93 -20
- package/dist/src/comparison.js.map +1 -1
- package/dist/src/compile/builtins/array.d.ts +2 -1
- package/dist/src/compile/builtins/array.d.ts.map +1 -1
- package/dist/src/compile/builtins/array.js +35 -0
- package/dist/src/compile/builtins/array.js.map +1 -1
- package/dist/src/compile/builtins/dict.d.ts +1 -0
- package/dist/src/compile/builtins/dict.d.ts.map +1 -1
- package/dist/src/compile/builtins/dict.js +25 -0
- package/dist/src/compile/builtins/dict.js.map +1 -1
- package/dist/src/compile/builtins/set.d.ts +1 -0
- package/dist/src/compile/builtins/set.d.ts.map +1 -1
- package/dist/src/compile/builtins/set.js +25 -0
- package/dist/src/compile/builtins/set.js.map +1 -1
- package/dist/src/compile/builtins/tree.d.ts +32 -0
- package/dist/src/compile/builtins/tree.d.ts.map +1 -0
- package/dist/src/compile/builtins/tree.js +108 -0
- package/dist/src/compile/builtins/tree.js.map +1 -0
- package/dist/src/compile/functions.d.ts.map +1 -1
- package/dist/src/compile/functions.js +4 -4
- package/dist/src/compile/functions.js.map +1 -1
- package/dist/src/compile/runtime.d.ts +12 -15
- package/dist/src/compile/runtime.d.ts.map +1 -1
- package/dist/src/compile/runtime.js +19 -16
- package/dist/src/compile/runtime.js.map +1 -1
- package/dist/src/compile.signature.spec.d.ts +6 -0
- package/dist/src/compile.signature.spec.d.ts.map +1 -0
- package/dist/src/compile.signature.spec.js +53 -0
- package/dist/src/compile.signature.spec.js.map +1 -0
- package/dist/src/expr/array.d.ts +158 -81
- package/dist/src/expr/array.d.ts.map +1 -1
- package/dist/src/expr/array.js +68 -51
- package/dist/src/expr/array.js.map +1 -1
- package/dist/src/expr/ast.d.ts.map +1 -1
- package/dist/src/expr/ast.js +13 -0
- package/dist/src/expr/ast.js.map +1 -1
- package/dist/src/expr/blob.d.ts +8 -8
- package/dist/src/expr/blob.js +8 -8
- package/dist/src/expr/block.d.ts +18 -5
- package/dist/src/expr/block.d.ts.map +1 -1
- package/dist/src/expr/block.js +19 -0
- package/dist/src/expr/block.js.map +1 -1
- package/dist/src/expr/boolean.d.ts +10 -10
- package/dist/src/expr/boolean.js +10 -10
- package/dist/src/expr/datetime.d.ts +28 -28
- package/dist/src/expr/datetime.js +28 -28
- package/dist/src/expr/dict.d.ts +101 -51
- package/dist/src/expr/dict.d.ts.map +1 -1
- package/dist/src/expr/dict.js +97 -36
- package/dist/src/expr/dict.js.map +1 -1
- package/dist/src/expr/float.d.ts +23 -23
- package/dist/src/expr/float.js +23 -23
- package/dist/src/expr/integer.d.ts +17 -17
- package/dist/src/expr/integer.js +11 -11
- package/dist/src/expr/libs/array.d.ts +6 -6
- package/dist/src/expr/libs/array.js +6 -6
- package/dist/src/expr/libs/blob.d.ts +2 -2
- package/dist/src/expr/libs/blob.js +2 -2
- package/dist/src/expr/libs/datetime.d.ts +25 -25
- package/dist/src/expr/libs/datetime.js +25 -25
- package/dist/src/expr/libs/dict.d.ts +2 -2
- package/dist/src/expr/libs/dict.js +2 -2
- package/dist/src/expr/libs/float.d.ts +15 -15
- package/dist/src/expr/libs/float.js +15 -15
- package/dist/src/expr/libs/integer.d.ts +12 -12
- package/dist/src/expr/libs/integer.js +12 -12
- package/dist/src/expr/libs/set.d.ts +2 -2
- package/dist/src/expr/libs/set.js +2 -2
- package/dist/src/expr/libs/string.d.ts +4 -4
- package/dist/src/expr/libs/string.js +4 -4
- package/dist/src/expr/recursive.d.ts +22 -5
- package/dist/src/expr/recursive.d.ts.map +1 -1
- package/dist/src/expr/recursive.js +22 -5
- package/dist/src/expr/recursive.js.map +1 -1
- package/dist/src/expr/ref.d.ts +5 -5
- package/dist/src/expr/ref.js +5 -5
- package/dist/src/expr/set.d.ts +96 -51
- package/dist/src/expr/set.d.ts.map +1 -1
- package/dist/src/expr/set.js +85 -29
- package/dist/src/expr/set.js.map +1 -1
- package/dist/src/expr/string.d.ts +28 -28
- package/dist/src/expr/string.js +28 -28
- package/dist/src/expr/struct.d.ts.map +1 -1
- package/dist/src/expr/struct.js +2 -2
- package/dist/src/expr/variant.d.ts +12 -12
- package/dist/src/expr/variant.js +7 -7
- package/dist/src/function_symbols.d.ts +28 -0
- package/dist/src/function_symbols.d.ts.map +1 -0
- package/dist/src/function_symbols.js +28 -0
- package/dist/src/function_symbols.js.map +1 -0
- package/dist/src/location.d.ts +32 -0
- package/dist/src/location.d.ts.map +1 -1
- package/dist/src/location.js +38 -0
- package/dist/src/location.js.map +1 -1
- package/dist/src/location.spec.js +89 -1
- package/dist/src/location.spec.js.map +1 -1
- package/dist/src/runner_protocol.d.ts +46 -5
- package/dist/src/runner_protocol.d.ts.map +1 -1
- package/dist/src/runner_protocol.js +24 -5
- package/dist/src/runner_protocol.js.map +1 -1
- package/dist/src/serialization/beast2/index.d.ts +1 -0
- package/dist/src/serialization/beast2/index.d.ts.map +1 -1
- package/dist/src/serialization/beast2/index.js +1 -0
- package/dist/src/serialization/beast2/index.js.map +1 -1
- package/dist/src/serialization/beast2/v5/canonical.d.ts +101 -0
- package/dist/src/serialization/beast2/v5/canonical.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.js +436 -0
- package/dist/src/serialization/beast2/v5/canonical.js.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.js +124 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/elements.d.ts +3 -1
- package/dist/src/serialization/beast2/v5/elements.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/elements.js +7 -2
- package/dist/src/serialization/beast2/v5/elements.js.map +1 -1
- package/dist/src/serialization/beast2/v5/elements.spec.js +1 -1
- package/dist/src/serialization/beast2/v5/elements.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/intake.d.ts +98 -0
- package/dist/src/serialization/beast2/v5/intake.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/intake.js +462 -0
- package/dist/src/serialization/beast2/v5/intake.js.map +1 -0
- package/dist/src/serialization/beast2/v5/intake.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/intake.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/intake.spec.js +202 -0
- package/dist/src/serialization/beast2/v5/intake.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/runs.d.ts +6 -4
- package/dist/src/serialization/beast2/v5/runs.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/runs.js +31 -5
- package/dist/src/serialization/beast2/v5/runs.js.map +1 -1
- package/dist/src/serialization/beast2/v5/runs.spec.js +23 -3
- package/dist/src/serialization/beast2/v5/runs.spec.js.map +1 -1
- package/dist/src/serialization/index.d.ts +1 -1
- package/dist/src/serialization/index.d.ts.map +1 -1
- package/dist/src/serialization/index.js +1 -1
- package/dist/src/serialization/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
46
46
|
* const negate = East.function([IntegerType], IntegerType, ($, x) => {
|
|
47
47
|
* $.return(x.negate());
|
|
48
48
|
* });
|
|
49
|
-
* const compiled = East.compile(negate
|
|
49
|
+
* const compiled = East.compile(negate, []);
|
|
50
50
|
* compiled(5n); // -5n
|
|
51
51
|
* compiled(-3n); // 3n
|
|
52
52
|
* ```
|
|
@@ -63,7 +63,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
63
63
|
* const addIntegers = East.function([IntegerType, IntegerType], IntegerType, ($, x, y) => {
|
|
64
64
|
* $.return(x.add(y));
|
|
65
65
|
* });
|
|
66
|
-
* const compiled = East.compile(addIntegers
|
|
66
|
+
* const compiled = East.compile(addIntegers, []);
|
|
67
67
|
* compiled(3n, 4n); // 7n
|
|
68
68
|
*
|
|
69
69
|
* // Adding with float promotes to float
|
|
@@ -85,7 +85,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
85
85
|
* const subtractIntegers = East.function([IntegerType, IntegerType], IntegerType, ($, x, y) => {
|
|
86
86
|
* $.return(x.subtract(y));
|
|
87
87
|
* });
|
|
88
|
-
* const compiled = East.compile(subtractIntegers
|
|
88
|
+
* const compiled = East.compile(subtractIntegers, []);
|
|
89
89
|
* compiled(10n, 3n); // 7n
|
|
90
90
|
* compiled(5n, 8n); // -3n
|
|
91
91
|
* ```
|
|
@@ -103,7 +103,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
103
103
|
* const multiplyIntegers = East.function([IntegerType, IntegerType], IntegerType, ($, x, y) => {
|
|
104
104
|
* $.return(x.multiply(y));
|
|
105
105
|
* });
|
|
106
|
-
* const compiled = East.compile(multiplyIntegers
|
|
106
|
+
* const compiled = East.compile(multiplyIntegers, []);
|
|
107
107
|
* compiled(6n, 7n); // 42n
|
|
108
108
|
* compiled(-3n, 4n); // -12n
|
|
109
109
|
* ```
|
|
@@ -126,7 +126,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
126
126
|
* const divideIntegers = East.function([IntegerType, IntegerType], IntegerType, ($, x, y) => {
|
|
127
127
|
* $.return(x.divide(y));
|
|
128
128
|
* });
|
|
129
|
-
* const compiled = East.compile(divideIntegers
|
|
129
|
+
* const compiled = East.compile(divideIntegers, []);
|
|
130
130
|
* compiled(10n, 3n); // 3n
|
|
131
131
|
* compiled(10n, 2n); // 5n
|
|
132
132
|
* compiled(-10n, 3n); // -3n (truncated toward zero)
|
|
@@ -152,7 +152,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
152
152
|
* const getRemainder = East.function([IntegerType, IntegerType], IntegerType, ($, x, y) => {
|
|
153
153
|
* $.return(x.remainder(y));
|
|
154
154
|
* });
|
|
155
|
-
* const compiled = East.compile(getRemainder
|
|
155
|
+
* const compiled = East.compile(getRemainder, []);
|
|
156
156
|
* compiled(10n, 3n); // 1n (10 = 3*3 + 1)
|
|
157
157
|
* compiled(10n, 4n); // 2n
|
|
158
158
|
* compiled(-10n, 3n); // -1n (sign of the dividend)
|
|
@@ -175,7 +175,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
175
175
|
* const power = East.function([IntegerType, IntegerType], IntegerType, ($, base, exp) => {
|
|
176
176
|
* $.return(base.pow(exp));
|
|
177
177
|
* });
|
|
178
|
-
* const compiled = East.compile(power
|
|
178
|
+
* const compiled = East.compile(power, []);
|
|
179
179
|
* compiled(2n, 3n); // 8n (2^3)
|
|
180
180
|
* compiled(5n, 2n); // 25n
|
|
181
181
|
* compiled(10n, 0n); // 1n (anything^0 = 1)
|
|
@@ -194,7 +194,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
194
194
|
* const absoluteValue = East.function([IntegerType], IntegerType, ($, x) => {
|
|
195
195
|
* $.return(x.abs());
|
|
196
196
|
* });
|
|
197
|
-
* const compiled = East.compile(absoluteValue
|
|
197
|
+
* const compiled = East.compile(absoluteValue, []);
|
|
198
198
|
* compiled(5n); // 5n
|
|
199
199
|
* compiled(-5n); // 5n
|
|
200
200
|
* compiled(0n); // 0n
|
|
@@ -211,7 +211,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
211
211
|
* const getSign = East.function([IntegerType], IntegerType, ($, x) => {
|
|
212
212
|
* $.return(x.sign());
|
|
213
213
|
* });
|
|
214
|
-
* const compiled = East.compile(getSign
|
|
214
|
+
* const compiled = East.compile(getSign, []);
|
|
215
215
|
* compiled(42n); // 1n
|
|
216
216
|
* compiled(-17n); // -1n
|
|
217
217
|
* compiled(0n); // 0n
|
|
@@ -231,7 +231,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
231
231
|
* const logarithm = East.function([IntegerType, IntegerType], IntegerType, ($, x, base) => {
|
|
232
232
|
* $.return(x.log(base));
|
|
233
233
|
* });
|
|
234
|
-
* const compiled = East.compile(logarithm
|
|
234
|
+
* const compiled = East.compile(logarithm, []);
|
|
235
235
|
* compiled(1000n, 10n); // 3n (10^3 = 1000)
|
|
236
236
|
* compiled(8n, 2n); // 3n (2^3 = 8)
|
|
237
237
|
* compiled(100n, 10n); // 2n (10^2 = 100)
|
|
@@ -251,7 +251,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
251
251
|
* const convertToFloat = East.function([IntegerType], FloatType, ($, x) => {
|
|
252
252
|
* $.return(x.toFloat());
|
|
253
253
|
* });
|
|
254
|
-
* const compiled = East.compile(convertToFloat
|
|
254
|
+
* const compiled = East.compile(convertToFloat, []);
|
|
255
255
|
* compiled(42n); // 42.0
|
|
256
256
|
* compiled(-17n); // -17.0
|
|
257
257
|
* compiled(0n); // 0.0
|
|
@@ -269,7 +269,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
269
269
|
* const isEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
270
270
|
* $.return(a.equals(b));
|
|
271
271
|
* });
|
|
272
|
-
* const compiled = East.compile(isEqual
|
|
272
|
+
* const compiled = East.compile(isEqual, []);
|
|
273
273
|
* compiled(5n, 5n); // true
|
|
274
274
|
* compiled(5n, 3n); // false
|
|
275
275
|
* ```
|
|
@@ -286,7 +286,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
286
286
|
* const isNotEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
287
287
|
* $.return(a.notEquals(b));
|
|
288
288
|
* });
|
|
289
|
-
* const compiled = East.compile(isNotEqual
|
|
289
|
+
* const compiled = East.compile(isNotEqual, []);
|
|
290
290
|
* compiled(5n, 3n); // true
|
|
291
291
|
* compiled(5n, 5n); // false
|
|
292
292
|
* ```
|
|
@@ -303,7 +303,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
303
303
|
* const isGreater = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
304
304
|
* $.return(a.greaterThan(b));
|
|
305
305
|
* });
|
|
306
|
-
* const compiled = East.compile(isGreater
|
|
306
|
+
* const compiled = East.compile(isGreater, []);
|
|
307
307
|
* compiled(5n, 3n); // true
|
|
308
308
|
* compiled(3n, 5n); // false
|
|
309
309
|
* compiled(5n, 5n); // false
|
|
@@ -321,7 +321,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
321
321
|
* const isLess = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
322
322
|
* $.return(a.lessThan(b));
|
|
323
323
|
* });
|
|
324
|
-
* const compiled = East.compile(isLess
|
|
324
|
+
* const compiled = East.compile(isLess, []);
|
|
325
325
|
* compiled(3n, 5n); // true
|
|
326
326
|
* compiled(5n, 3n); // false
|
|
327
327
|
* compiled(5n, 5n); // false
|
|
@@ -339,7 +339,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
339
339
|
* const isGreaterOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
340
340
|
* $.return(a.greaterThanOrEqual(b));
|
|
341
341
|
* });
|
|
342
|
-
* const compiled = East.compile(isGreaterOrEqual
|
|
342
|
+
* const compiled = East.compile(isGreaterOrEqual, []);
|
|
343
343
|
* compiled(5n, 3n); // true
|
|
344
344
|
* compiled(5n, 5n); // true
|
|
345
345
|
* compiled(3n, 5n); // false
|
|
@@ -357,7 +357,7 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
357
357
|
* const isLessOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
358
358
|
* $.return(a.lessThanOrEqual(b));
|
|
359
359
|
* });
|
|
360
|
-
* const compiled = East.compile(isLessOrEqual
|
|
360
|
+
* const compiled = East.compile(isLessOrEqual, []);
|
|
361
361
|
* compiled(3n, 5n); // true
|
|
362
362
|
* compiled(5n, 5n); // true
|
|
363
363
|
* compiled(5n, 3n); // false
|
package/dist/src/expr/integer.js
CHANGED
|
@@ -44,7 +44,7 @@ export class IntegerExpr extends Expr {
|
|
|
44
44
|
* const negate = East.function([IntegerType], IntegerType, ($, x) => {
|
|
45
45
|
* $.return(x.negate());
|
|
46
46
|
* });
|
|
47
|
-
* const compiled = East.compile(negate
|
|
47
|
+
* const compiled = East.compile(negate, []);
|
|
48
48
|
* compiled(5n); // -5n
|
|
49
49
|
* compiled(-3n); // 3n
|
|
50
50
|
* ```
|
|
@@ -207,7 +207,7 @@ export class IntegerExpr extends Expr {
|
|
|
207
207
|
* const absoluteValue = East.function([IntegerType], IntegerType, ($, x) => {
|
|
208
208
|
* $.return(x.abs());
|
|
209
209
|
* });
|
|
210
|
-
* const compiled = East.compile(absoluteValue
|
|
210
|
+
* const compiled = East.compile(absoluteValue, []);
|
|
211
211
|
* compiled(5n); // 5n
|
|
212
212
|
* compiled(-5n); // 5n
|
|
213
213
|
* compiled(0n); // 0n
|
|
@@ -233,7 +233,7 @@ export class IntegerExpr extends Expr {
|
|
|
233
233
|
* const getSign = East.function([IntegerType], IntegerType, ($, x) => {
|
|
234
234
|
* $.return(x.sign());
|
|
235
235
|
* });
|
|
236
|
-
* const compiled = East.compile(getSign
|
|
236
|
+
* const compiled = East.compile(getSign, []);
|
|
237
237
|
* compiled(42n); // 1n
|
|
238
238
|
* compiled(-17n); // -1n
|
|
239
239
|
* compiled(0n); // 0n
|
|
@@ -262,7 +262,7 @@ export class IntegerExpr extends Expr {
|
|
|
262
262
|
* const logarithm = East.function([IntegerType, IntegerType], IntegerType, ($, x, base) => {
|
|
263
263
|
* $.return(x.log(base));
|
|
264
264
|
* });
|
|
265
|
-
* const compiled = East.compile(logarithm
|
|
265
|
+
* const compiled = East.compile(logarithm, []);
|
|
266
266
|
* compiled(1000n, 10n); // 3n (10^3 = 1000)
|
|
267
267
|
* compiled(8n, 2n); // 3n (2^3 = 8)
|
|
268
268
|
* compiled(100n, 10n); // 2n (10^2 = 100)
|
|
@@ -292,7 +292,7 @@ export class IntegerExpr extends Expr {
|
|
|
292
292
|
* const convertToFloat = East.function([IntegerType], FloatType, ($, x) => {
|
|
293
293
|
* $.return(x.toFloat());
|
|
294
294
|
* });
|
|
295
|
-
* const compiled = East.compile(convertToFloat
|
|
295
|
+
* const compiled = East.compile(convertToFloat, []);
|
|
296
296
|
* compiled(42n); // 42.0
|
|
297
297
|
* compiled(-17n); // -17.0
|
|
298
298
|
* compiled(0n); // 0.0
|
|
@@ -319,7 +319,7 @@ export class IntegerExpr extends Expr {
|
|
|
319
319
|
* const isEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
320
320
|
* $.return(a.equals(b));
|
|
321
321
|
* });
|
|
322
|
-
* const compiled = East.compile(isEqual
|
|
322
|
+
* const compiled = East.compile(isEqual, []);
|
|
323
323
|
* compiled(5n, 5n); // true
|
|
324
324
|
* compiled(5n, 3n); // false
|
|
325
325
|
* ```
|
|
@@ -338,7 +338,7 @@ export class IntegerExpr extends Expr {
|
|
|
338
338
|
* const isNotEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
339
339
|
* $.return(a.notEquals(b));
|
|
340
340
|
* });
|
|
341
|
-
* const compiled = East.compile(isNotEqual
|
|
341
|
+
* const compiled = East.compile(isNotEqual, []);
|
|
342
342
|
* compiled(5n, 3n); // true
|
|
343
343
|
* compiled(5n, 5n); // false
|
|
344
344
|
* ```
|
|
@@ -357,7 +357,7 @@ export class IntegerExpr extends Expr {
|
|
|
357
357
|
* const isGreater = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
358
358
|
* $.return(a.greaterThan(b));
|
|
359
359
|
* });
|
|
360
|
-
* const compiled = East.compile(isGreater
|
|
360
|
+
* const compiled = East.compile(isGreater, []);
|
|
361
361
|
* compiled(5n, 3n); // true
|
|
362
362
|
* compiled(3n, 5n); // false
|
|
363
363
|
* compiled(5n, 5n); // false
|
|
@@ -377,7 +377,7 @@ export class IntegerExpr extends Expr {
|
|
|
377
377
|
* const isLess = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
378
378
|
* $.return(a.lessThan(b));
|
|
379
379
|
* });
|
|
380
|
-
* const compiled = East.compile(isLess
|
|
380
|
+
* const compiled = East.compile(isLess, []);
|
|
381
381
|
* compiled(3n, 5n); // true
|
|
382
382
|
* compiled(5n, 3n); // false
|
|
383
383
|
* compiled(5n, 5n); // false
|
|
@@ -397,7 +397,7 @@ export class IntegerExpr extends Expr {
|
|
|
397
397
|
* const isGreaterOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
398
398
|
* $.return(a.greaterThanOrEqual(b));
|
|
399
399
|
* });
|
|
400
|
-
* const compiled = East.compile(isGreaterOrEqual
|
|
400
|
+
* const compiled = East.compile(isGreaterOrEqual, []);
|
|
401
401
|
* compiled(5n, 3n); // true
|
|
402
402
|
* compiled(5n, 5n); // true
|
|
403
403
|
* compiled(3n, 5n); // false
|
|
@@ -417,7 +417,7 @@ export class IntegerExpr extends Expr {
|
|
|
417
417
|
* const isLessOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
418
418
|
* $.return(a.lessThanOrEqual(b));
|
|
419
419
|
* });
|
|
420
|
-
* const compiled = East.compile(isLessOrEqual
|
|
420
|
+
* const compiled = East.compile(isLessOrEqual, []);
|
|
421
421
|
* compiled(3n, 5n); // true
|
|
422
422
|
* compiled(5n, 5n); // true
|
|
423
423
|
* compiled(5n, 3n); // false
|
|
@@ -24,7 +24,7 @@ declare const _default: {
|
|
|
24
24
|
* const makeRange = East.function([], ArrayType(IntegerType), ($) => {
|
|
25
25
|
* $.return(East.Array.range(0n, 5n));
|
|
26
26
|
* });
|
|
27
|
-
* const compiled = East.compile(makeRange
|
|
27
|
+
* const compiled = East.compile(makeRange, []);
|
|
28
28
|
* compiled(); // [0n, 1n, 2n, 3n, 4n]
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
@@ -34,7 +34,7 @@ declare const _default: {
|
|
|
34
34
|
* const makeRangeStep = East.function([], ArrayType(IntegerType), ($) => {
|
|
35
35
|
* $.return(East.Array.range(1n, 10n, 2n));
|
|
36
36
|
* });
|
|
37
|
-
* const compiled = East.compile(makeRangeStep
|
|
37
|
+
* const compiled = East.compile(makeRangeStep, []);
|
|
38
38
|
* compiled(); // [1n, 3n, 5n, 7n, 9n]
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
@@ -56,7 +56,7 @@ declare const _default: {
|
|
|
56
56
|
* const makeLinspace = East.function([], ArrayType(FloatType), ($) => {
|
|
57
57
|
* $.return(East.Array.linspace(0.0, 1.0, 11n));
|
|
58
58
|
* });
|
|
59
|
-
* const compiled = East.compile(makeLinspace
|
|
59
|
+
* const compiled = East.compile(makeLinspace, []);
|
|
60
60
|
* compiled(); // [0.0, 0.1, 0.2, ..., 0.9, 1.0]
|
|
61
61
|
* ```
|
|
62
62
|
*
|
|
@@ -66,7 +66,7 @@ declare const _default: {
|
|
|
66
66
|
* const makeLinspace2 = East.function([], ArrayType(FloatType), ($) => {
|
|
67
67
|
* $.return(East.Array.linspace(0.0, 10.0, 5n));
|
|
68
68
|
* });
|
|
69
|
-
* const compiled = East.compile(makeLinspace2
|
|
69
|
+
* const compiled = East.compile(makeLinspace2, []);
|
|
70
70
|
* compiled(); // [0.0, 2.5, 5.0, 7.5, 10.0]
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
@@ -86,7 +86,7 @@ declare const _default: {
|
|
|
86
86
|
* const makeSquares = East.function([], ArrayType(IntegerType), ($) => {
|
|
87
87
|
* $.return(East.Array.generate(5n, IntegerType, ($, i) => i.multiply(i)));
|
|
88
88
|
* });
|
|
89
|
-
* const compiled = East.compile(makeSquares
|
|
89
|
+
* const compiled = East.compile(makeSquares, []);
|
|
90
90
|
* compiled(); // [0n, 1n, 4n, 9n, 16n]
|
|
91
91
|
* ```
|
|
92
92
|
*
|
|
@@ -96,7 +96,7 @@ declare const _default: {
|
|
|
96
96
|
* const makeItems = East.function([], ArrayType(StringType), ($) => {
|
|
97
97
|
* $.return(East.Array.generate(3n, StringType, ($, i) => Expr.str`Item ${i}`));
|
|
98
98
|
* });
|
|
99
|
-
* const compiled = East.compile(makeItems
|
|
99
|
+
* const compiled = East.compile(makeItems, []);
|
|
100
100
|
* compiled(); // ["Item 0", "Item 1", "Item 2"]
|
|
101
101
|
* ```
|
|
102
102
|
*/
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
* const makeRange = East.function([], ArrayType(IntegerType), ($) => {
|
|
24
24
|
* $.return(East.Array.range(0n, 5n));
|
|
25
25
|
* });
|
|
26
|
-
* const compiled = East.compile(makeRange
|
|
26
|
+
* const compiled = East.compile(makeRange, []);
|
|
27
27
|
* compiled(); // [0n, 1n, 2n, 3n, 4n]
|
|
28
28
|
* ```
|
|
29
29
|
*
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
* const makeRangeStep = East.function([], ArrayType(IntegerType), ($) => {
|
|
34
34
|
* $.return(East.Array.range(1n, 10n, 2n));
|
|
35
35
|
* });
|
|
36
|
-
* const compiled = East.compile(makeRangeStep
|
|
36
|
+
* const compiled = East.compile(makeRangeStep, []);
|
|
37
37
|
* compiled(); // [1n, 3n, 5n, 7n, 9n]
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
* const makeLinspace = East.function([], ArrayType(FloatType), ($) => {
|
|
68
68
|
* $.return(East.Array.linspace(0.0, 1.0, 11n));
|
|
69
69
|
* });
|
|
70
|
-
* const compiled = East.compile(makeLinspace
|
|
70
|
+
* const compiled = East.compile(makeLinspace, []);
|
|
71
71
|
* compiled(); // [0.0, 0.1, 0.2, ..., 0.9, 1.0]
|
|
72
72
|
* ```
|
|
73
73
|
*
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
* const makeLinspace2 = East.function([], ArrayType(FloatType), ($) => {
|
|
78
78
|
* $.return(East.Array.linspace(0.0, 10.0, 5n));
|
|
79
79
|
* });
|
|
80
|
-
* const compiled = East.compile(makeLinspace2
|
|
80
|
+
* const compiled = East.compile(makeLinspace2, []);
|
|
81
81
|
* compiled(); // [0.0, 2.5, 5.0, 7.5, 10.0]
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
109
109
|
* const makeSquares = East.function([], ArrayType(IntegerType), ($) => {
|
|
110
110
|
* $.return(East.Array.generate(5n, IntegerType, ($, i) => i.multiply(i)));
|
|
111
111
|
* });
|
|
112
|
-
* const compiled = East.compile(makeSquares
|
|
112
|
+
* const compiled = East.compile(makeSquares, []);
|
|
113
113
|
* compiled(); // [0n, 1n, 4n, 9n, 16n]
|
|
114
114
|
* ```
|
|
115
115
|
*
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
119
119
|
* const makeItems = East.function([], ArrayType(StringType), ($) => {
|
|
120
120
|
* $.return(East.Array.generate(3n, StringType, ($, i) => Expr.str`Item ${i}`));
|
|
121
121
|
* });
|
|
122
|
-
* const compiled = East.compile(makeItems
|
|
122
|
+
* const compiled = East.compile(makeItems, []);
|
|
123
123
|
* compiled(); // ["Item 0", "Item 1", "Item 2"]
|
|
124
124
|
* ```
|
|
125
125
|
*/
|
|
@@ -31,7 +31,7 @@ declare const _default: {
|
|
|
31
31
|
* const encodeArray = East.function([ArrayType(IntegerType)], BlobType, ($, arr) => {
|
|
32
32
|
* $.return(East.Blob.encodeBeast(arr));
|
|
33
33
|
* });
|
|
34
|
-
* const compiled = East.compile(encodeArray
|
|
34
|
+
* const compiled = East.compile(encodeArray, []);
|
|
35
35
|
* const blob = compiled([1n, 2n, 3n]); // Binary blob containing encoded array
|
|
36
36
|
* ```
|
|
37
37
|
*
|
|
@@ -41,7 +41,7 @@ declare const _default: {
|
|
|
41
41
|
* const encodeV2 = East.function([IntegerType], BlobType, ($, num) => {
|
|
42
42
|
* $.return(East.Blob.encodeBeast(num, 'v2'));
|
|
43
43
|
* });
|
|
44
|
-
* const compiled = East.compile(encodeV2
|
|
44
|
+
* const compiled = East.compile(encodeV2, []);
|
|
45
45
|
* const blob = compiled(42n); // Binary blob with v2 encoding
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
* const encodeArray = East.function([ArrayType(IntegerType)], BlobType, ($, arr) => {
|
|
37
37
|
* $.return(East.Blob.encodeBeast(arr));
|
|
38
38
|
* });
|
|
39
|
-
* const compiled = East.compile(encodeArray
|
|
39
|
+
* const compiled = East.compile(encodeArray, []);
|
|
40
40
|
* const blob = compiled([1n, 2n, 3n]); // Binary blob containing encoded array
|
|
41
41
|
* ```
|
|
42
42
|
*
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
* const encodeV2 = East.function([IntegerType], BlobType, ($, num) => {
|
|
47
47
|
* $.return(East.Blob.encodeBeast(num, 'v2'));
|
|
48
48
|
* });
|
|
49
|
-
* const compiled = East.compile(encodeV2
|
|
49
|
+
* const compiled = East.compile(encodeV2, []);
|
|
50
50
|
* const blob = compiled(42n); // Binary blob with v2 encoding
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
@@ -21,7 +21,7 @@ declare const _default: {
|
|
|
21
21
|
* const fromEpoch = East.function([IntegerType], DateTimeType, ($, ms) => {
|
|
22
22
|
* $.return(East.DateTime.fromEpochMilliseconds(ms));
|
|
23
23
|
* });
|
|
24
|
-
* const compiled = East.compile(fromEpoch
|
|
24
|
+
* const compiled = East.compile(fromEpoch, []);
|
|
25
25
|
* compiled(0n); // 1970-01-01T00:00:00.000Z
|
|
26
26
|
* compiled(1609459200000n); // 2021-01-01T00:00:00.000Z
|
|
27
27
|
* ```
|
|
@@ -59,7 +59,7 @@ declare const _default: {
|
|
|
59
59
|
* const makeDate = East.function([IntegerType], DateTimeType, ($, year) => {
|
|
60
60
|
* $.return(East.DateTime.fromComponents(year, 1n, 15n));
|
|
61
61
|
* });
|
|
62
|
-
* const compiled = East.compile(makeDate
|
|
62
|
+
* const compiled = East.compile(makeDate, []);
|
|
63
63
|
* compiled(2025n); // 2025-01-15T00:00:00.000Z
|
|
64
64
|
* ```
|
|
65
65
|
*
|
|
@@ -68,7 +68,7 @@ declare const _default: {
|
|
|
68
68
|
* const makeDateTime = East.function([], DateTimeType, ($) => {
|
|
69
69
|
* $.return(East.DateTime.fromComponents(2025n, 1n, 15n, 14n, 30n, 0n, 500n));
|
|
70
70
|
* });
|
|
71
|
-
* const compiled = East.compile(makeDateTime
|
|
71
|
+
* const compiled = East.compile(makeDateTime, []);
|
|
72
72
|
* compiled(); // 2025-01-15T14:30:00.500Z
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
@@ -102,7 +102,7 @@ declare const _default: {
|
|
|
102
102
|
* const parseDate = East.function([StringType], DateTimeType, ($, dateStr) => {
|
|
103
103
|
* $.return(East.DateTime.parseFormatted(dateStr, "YYYY-MM-DD"));
|
|
104
104
|
* });
|
|
105
|
-
* const compiled = East.compile(parseDate
|
|
105
|
+
* const compiled = East.compile(parseDate, []);
|
|
106
106
|
* compiled("2025-01-15"); // 2025-01-15T00:00:00.000Z
|
|
107
107
|
* ```
|
|
108
108
|
*
|
|
@@ -111,7 +111,7 @@ declare const _default: {
|
|
|
111
111
|
* const parseDateTime = East.function([StringType], DateTimeType, ($, str) => {
|
|
112
112
|
* $.return(East.DateTime.parseFormatted(str, "MM/DD/YYYY HH:mm"));
|
|
113
113
|
* });
|
|
114
|
-
* const compiled = East.compile(parseDateTime
|
|
114
|
+
* const compiled = East.compile(parseDateTime, []);
|
|
115
115
|
* compiled("01/15/2025 14:30"); // 2025-01-15T14:30:00.000Z
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
@@ -128,7 +128,7 @@ declare const _default: {
|
|
|
128
128
|
* const roundMs = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
129
129
|
* $.return(East.DateTime.roundDownMillisecond(dt, step));
|
|
130
130
|
* });
|
|
131
|
-
* const compiled = East.compile(roundMs
|
|
131
|
+
* const compiled = East.compile(roundMs, []);
|
|
132
132
|
* // Round down to nearest 100ms
|
|
133
133
|
* compiled(East.DateTime.fromEpochMilliseconds(1234n), 100n); // Rounded to 1200ms
|
|
134
134
|
* ```
|
|
@@ -146,7 +146,7 @@ declare const _default: {
|
|
|
146
146
|
* const roundSec = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
147
147
|
* $.return(East.DateTime.roundDownSecond(dt, step));
|
|
148
148
|
* });
|
|
149
|
-
* const compiled = East.compile(roundSec
|
|
149
|
+
* const compiled = East.compile(roundSec, []);
|
|
150
150
|
* // Round down to nearest 30 seconds
|
|
151
151
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 45n), 30n); // Rounds to 30s
|
|
152
152
|
* ```
|
|
@@ -164,7 +164,7 @@ declare const _default: {
|
|
|
164
164
|
* const roundMin = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
165
165
|
* $.return(East.DateTime.roundDownMinute(dt, step));
|
|
166
166
|
* });
|
|
167
|
-
* const compiled = East.compile(roundMin
|
|
167
|
+
* const compiled = East.compile(roundMin, []);
|
|
168
168
|
* // Round down to nearest 15 minutes
|
|
169
169
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 22n), 15n); // Rounds to 15 min
|
|
170
170
|
* ```
|
|
@@ -182,7 +182,7 @@ declare const _default: {
|
|
|
182
182
|
* const roundHour = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
183
183
|
* $.return(East.DateTime.roundDownHour(dt, step));
|
|
184
184
|
* });
|
|
185
|
-
* const compiled = East.compile(roundHour
|
|
185
|
+
* const compiled = East.compile(roundHour, []);
|
|
186
186
|
* // Round down to nearest 6 hours
|
|
187
187
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 6n); // Rounds to 6:00
|
|
188
188
|
* ```
|
|
@@ -200,7 +200,7 @@ declare const _default: {
|
|
|
200
200
|
* const roundUpMs = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
201
201
|
* $.return(East.DateTime.roundUpMillisecond(dt, step));
|
|
202
202
|
* });
|
|
203
|
-
* const compiled = East.compile(roundUpMs
|
|
203
|
+
* const compiled = East.compile(roundUpMs, []);
|
|
204
204
|
* // Round up to nearest 100ms
|
|
205
205
|
* compiled(East.DateTime.fromEpochMilliseconds(1234n), 100n); // Rounds to 1300ms
|
|
206
206
|
* ```
|
|
@@ -218,7 +218,7 @@ declare const _default: {
|
|
|
218
218
|
* const roundNearMs = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
219
219
|
* $.return(East.DateTime.roundNearestMillisecond(dt, step));
|
|
220
220
|
* });
|
|
221
|
-
* const compiled = East.compile(roundNearMs
|
|
221
|
+
* const compiled = East.compile(roundNearMs, []);
|
|
222
222
|
* // Round to nearest 100ms
|
|
223
223
|
* compiled(East.DateTime.fromEpochMilliseconds(1234n), 100n); // Rounds to 1200ms
|
|
224
224
|
* compiled(East.DateTime.fromEpochMilliseconds(1289n), 100n); // Rounds to 1300ms
|
|
@@ -237,7 +237,7 @@ declare const _default: {
|
|
|
237
237
|
* const roundUpSec = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
238
238
|
* $.return(East.DateTime.roundUpSecond(dt, step));
|
|
239
239
|
* });
|
|
240
|
-
* const compiled = East.compile(roundUpSec
|
|
240
|
+
* const compiled = East.compile(roundUpSec, []);
|
|
241
241
|
* // Round up to nearest 30 seconds
|
|
242
242
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 15n), 30n); // Rounds to 30s
|
|
243
243
|
* ```
|
|
@@ -255,7 +255,7 @@ declare const _default: {
|
|
|
255
255
|
* const roundNearSec = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
256
256
|
* $.return(East.DateTime.roundNearestSecond(dt, step));
|
|
257
257
|
* });
|
|
258
|
-
* const compiled = East.compile(roundNearSec
|
|
258
|
+
* const compiled = East.compile(roundNearSec, []);
|
|
259
259
|
* // Round to nearest 30 seconds
|
|
260
260
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 22n), 30n); // Rounds to 30s
|
|
261
261
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 38n), 30n); // Rounds to 30s
|
|
@@ -274,7 +274,7 @@ declare const _default: {
|
|
|
274
274
|
* const roundUpMin = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
275
275
|
* $.return(East.DateTime.roundUpMinute(dt, step));
|
|
276
276
|
* });
|
|
277
|
-
* const compiled = East.compile(roundUpMin
|
|
277
|
+
* const compiled = East.compile(roundUpMin, []);
|
|
278
278
|
* // Round up to nearest 15 minutes
|
|
279
279
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 22n), 15n); // Rounds to 30 min
|
|
280
280
|
* ```
|
|
@@ -292,7 +292,7 @@ declare const _default: {
|
|
|
292
292
|
* const roundNearMin = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
293
293
|
* $.return(East.DateTime.roundNearestMinute(dt, step));
|
|
294
294
|
* });
|
|
295
|
-
* const compiled = East.compile(roundNearMin
|
|
295
|
+
* const compiled = East.compile(roundNearMin, []);
|
|
296
296
|
* // Round to nearest 15 minutes
|
|
297
297
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 22n), 15n); // Rounds to 15 min
|
|
298
298
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 38n), 15n); // Rounds to 45 min
|
|
@@ -311,7 +311,7 @@ declare const _default: {
|
|
|
311
311
|
* const roundUpHr = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
312
312
|
* $.return(East.DateTime.roundUpHour(dt, step));
|
|
313
313
|
* });
|
|
314
|
-
* const compiled = East.compile(roundUpHr
|
|
314
|
+
* const compiled = East.compile(roundUpHr, []);
|
|
315
315
|
* // Round up to nearest 6 hours
|
|
316
316
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 6n); // Rounds to 12:00
|
|
317
317
|
* ```
|
|
@@ -329,7 +329,7 @@ declare const _default: {
|
|
|
329
329
|
* const roundNearHr = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
330
330
|
* $.return(East.DateTime.roundNearestHour(dt, step));
|
|
331
331
|
* });
|
|
332
|
-
* const compiled = East.compile(roundNearHr
|
|
332
|
+
* const compiled = East.compile(roundNearHr, []);
|
|
333
333
|
* // Round to nearest 6 hours
|
|
334
334
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 6n); // Rounds to 6:00
|
|
335
335
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 10n), 6n); // Rounds to 12:00
|
|
@@ -348,7 +348,7 @@ declare const _default: {
|
|
|
348
348
|
* const roundDownD = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
349
349
|
* $.return(East.DateTime.roundDownDay(dt, step));
|
|
350
350
|
* });
|
|
351
|
-
* const compiled = East.compile(roundDownD
|
|
351
|
+
* const compiled = East.compile(roundDownD, []);
|
|
352
352
|
* // Round down to nearest day
|
|
353
353
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 12n, 30n), 1n); // Rounds to start of day
|
|
354
354
|
* ```
|
|
@@ -366,7 +366,7 @@ declare const _default: {
|
|
|
366
366
|
* const roundUpD = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
367
367
|
* $.return(East.DateTime.roundUpDay(dt, step));
|
|
368
368
|
* });
|
|
369
|
-
* const compiled = East.compile(roundUpD
|
|
369
|
+
* const compiled = East.compile(roundUpD, []);
|
|
370
370
|
* // Round up to nearest day
|
|
371
371
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 12n, 30n), 1n); // Rounds to next day start
|
|
372
372
|
* ```
|
|
@@ -384,7 +384,7 @@ declare const _default: {
|
|
|
384
384
|
* const roundNearD = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
385
385
|
* $.return(East.DateTime.roundNearestDay(dt, step));
|
|
386
386
|
* });
|
|
387
|
-
* const compiled = East.compile(roundNearD
|
|
387
|
+
* const compiled = East.compile(roundNearD, []);
|
|
388
388
|
* // Round to nearest day
|
|
389
389
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 1n); // Rounds to start of day
|
|
390
390
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 16n), 1n); // Rounds to next day start
|
|
@@ -403,7 +403,7 @@ declare const _default: {
|
|
|
403
403
|
* const roundDownWk = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
404
404
|
* $.return(East.DateTime.roundDownWeek(dt, step));
|
|
405
405
|
* });
|
|
406
|
-
* const compiled = East.compile(roundDownWk
|
|
406
|
+
* const compiled = East.compile(roundDownWk, []);
|
|
407
407
|
* // Round down to nearest Monday
|
|
408
408
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 3n), 1n); // Rounds to previous Monday
|
|
409
409
|
* ```
|
|
@@ -421,7 +421,7 @@ declare const _default: {
|
|
|
421
421
|
* const roundUpWk = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
422
422
|
* $.return(East.DateTime.roundUpWeek(dt, step));
|
|
423
423
|
* });
|
|
424
|
-
* const compiled = East.compile(roundUpWk
|
|
424
|
+
* const compiled = East.compile(roundUpWk, []);
|
|
425
425
|
* // Round up to nearest Monday
|
|
426
426
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 3n), 1n); // Rounds to next Monday
|
|
427
427
|
* ```
|
|
@@ -439,7 +439,7 @@ declare const _default: {
|
|
|
439
439
|
* const roundNearWk = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
440
440
|
* $.return(East.DateTime.roundNearestWeek(dt, step));
|
|
441
441
|
* });
|
|
442
|
-
* const compiled = East.compile(roundNearWk
|
|
442
|
+
* const compiled = East.compile(roundNearWk, []);
|
|
443
443
|
* // Round to nearest Monday
|
|
444
444
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 3n), 1n); // Rounds to closest Monday
|
|
445
445
|
* ```
|
|
@@ -457,7 +457,7 @@ declare const _default: {
|
|
|
457
457
|
* const roundDownMo = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
458
458
|
* $.return(East.DateTime.roundDownMonth(dt, step));
|
|
459
459
|
* });
|
|
460
|
-
* const compiled = East.compile(roundDownMo
|
|
460
|
+
* const compiled = East.compile(roundDownMo, []);
|
|
461
461
|
* // Round down to nearest month (first day of the month at midnight)
|
|
462
462
|
* compiled(East.DateTime.fromComponents(2025n, 1n, 15n), 1n); // Rounds to Jan 1, 2025
|
|
463
463
|
* // Round down to nearest quarter (Jan 1, Apr 1, Jul 1, Oct 1)
|
|
@@ -477,7 +477,7 @@ declare const _default: {
|
|
|
477
477
|
* const roundDownYr = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
|
|
478
478
|
* $.return(East.DateTime.roundDownYear(dt, step));
|
|
479
479
|
* });
|
|
480
|
-
* const compiled = East.compile(roundDownYr
|
|
480
|
+
* const compiled = East.compile(roundDownYr, []);
|
|
481
481
|
* // Round down to nearest year (January 1st at midnight)
|
|
482
482
|
* compiled(East.DateTime.fromComponents(2025n, 6n, 15n), 1n); // Rounds to Jan 1, 2025
|
|
483
483
|
* // Round down to nearest decade
|