@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.
Files changed (150) hide show
  1. package/dist/src/builtins.d.ts +1 -1
  2. package/dist/src/builtins.d.ts.map +1 -1
  3. package/dist/src/builtins.js +19 -0
  4. package/dist/src/builtins.js.map +1 -1
  5. package/dist/src/codegen/spellings.d.ts.map +1 -1
  6. package/dist/src/codegen/spellings.js +3 -0
  7. package/dist/src/codegen/spellings.js.map +1 -1
  8. package/dist/src/comparison.d.ts +54 -0
  9. package/dist/src/comparison.d.ts.map +1 -1
  10. package/dist/src/comparison.equivalent.spec.d.ts +6 -0
  11. package/dist/src/comparison.equivalent.spec.d.ts.map +1 -0
  12. package/dist/src/comparison.equivalent.spec.js +130 -0
  13. package/dist/src/comparison.equivalent.spec.js.map +1 -0
  14. package/dist/src/comparison.js +93 -20
  15. package/dist/src/comparison.js.map +1 -1
  16. package/dist/src/compile/builtins/array.d.ts +2 -1
  17. package/dist/src/compile/builtins/array.d.ts.map +1 -1
  18. package/dist/src/compile/builtins/array.js +35 -0
  19. package/dist/src/compile/builtins/array.js.map +1 -1
  20. package/dist/src/compile/builtins/dict.d.ts +1 -0
  21. package/dist/src/compile/builtins/dict.d.ts.map +1 -1
  22. package/dist/src/compile/builtins/dict.js +25 -0
  23. package/dist/src/compile/builtins/dict.js.map +1 -1
  24. package/dist/src/compile/builtins/set.d.ts +1 -0
  25. package/dist/src/compile/builtins/set.d.ts.map +1 -1
  26. package/dist/src/compile/builtins/set.js +25 -0
  27. package/dist/src/compile/builtins/set.js.map +1 -1
  28. package/dist/src/compile/builtins/tree.d.ts +32 -0
  29. package/dist/src/compile/builtins/tree.d.ts.map +1 -0
  30. package/dist/src/compile/builtins/tree.js +108 -0
  31. package/dist/src/compile/builtins/tree.js.map +1 -0
  32. package/dist/src/compile/functions.d.ts.map +1 -1
  33. package/dist/src/compile/functions.js +4 -4
  34. package/dist/src/compile/functions.js.map +1 -1
  35. package/dist/src/compile/runtime.d.ts +12 -15
  36. package/dist/src/compile/runtime.d.ts.map +1 -1
  37. package/dist/src/compile/runtime.js +19 -16
  38. package/dist/src/compile/runtime.js.map +1 -1
  39. package/dist/src/compile.signature.spec.d.ts +6 -0
  40. package/dist/src/compile.signature.spec.d.ts.map +1 -0
  41. package/dist/src/compile.signature.spec.js +53 -0
  42. package/dist/src/compile.signature.spec.js.map +1 -0
  43. package/dist/src/expr/array.d.ts +158 -81
  44. package/dist/src/expr/array.d.ts.map +1 -1
  45. package/dist/src/expr/array.js +68 -51
  46. package/dist/src/expr/array.js.map +1 -1
  47. package/dist/src/expr/ast.d.ts.map +1 -1
  48. package/dist/src/expr/ast.js +13 -0
  49. package/dist/src/expr/ast.js.map +1 -1
  50. package/dist/src/expr/blob.d.ts +8 -8
  51. package/dist/src/expr/blob.js +8 -8
  52. package/dist/src/expr/block.d.ts +18 -5
  53. package/dist/src/expr/block.d.ts.map +1 -1
  54. package/dist/src/expr/block.js +19 -0
  55. package/dist/src/expr/block.js.map +1 -1
  56. package/dist/src/expr/boolean.d.ts +10 -10
  57. package/dist/src/expr/boolean.js +10 -10
  58. package/dist/src/expr/datetime.d.ts +28 -28
  59. package/dist/src/expr/datetime.js +28 -28
  60. package/dist/src/expr/dict.d.ts +101 -51
  61. package/dist/src/expr/dict.d.ts.map +1 -1
  62. package/dist/src/expr/dict.js +97 -36
  63. package/dist/src/expr/dict.js.map +1 -1
  64. package/dist/src/expr/float.d.ts +23 -23
  65. package/dist/src/expr/float.js +23 -23
  66. package/dist/src/expr/integer.d.ts +17 -17
  67. package/dist/src/expr/integer.js +11 -11
  68. package/dist/src/expr/libs/array.d.ts +6 -6
  69. package/dist/src/expr/libs/array.js +6 -6
  70. package/dist/src/expr/libs/blob.d.ts +2 -2
  71. package/dist/src/expr/libs/blob.js +2 -2
  72. package/dist/src/expr/libs/datetime.d.ts +25 -25
  73. package/dist/src/expr/libs/datetime.js +25 -25
  74. package/dist/src/expr/libs/dict.d.ts +2 -2
  75. package/dist/src/expr/libs/dict.js +2 -2
  76. package/dist/src/expr/libs/float.d.ts +15 -15
  77. package/dist/src/expr/libs/float.js +15 -15
  78. package/dist/src/expr/libs/integer.d.ts +12 -12
  79. package/dist/src/expr/libs/integer.js +12 -12
  80. package/dist/src/expr/libs/set.d.ts +2 -2
  81. package/dist/src/expr/libs/set.js +2 -2
  82. package/dist/src/expr/libs/string.d.ts +4 -4
  83. package/dist/src/expr/libs/string.js +4 -4
  84. package/dist/src/expr/recursive.d.ts +22 -5
  85. package/dist/src/expr/recursive.d.ts.map +1 -1
  86. package/dist/src/expr/recursive.js +22 -5
  87. package/dist/src/expr/recursive.js.map +1 -1
  88. package/dist/src/expr/ref.d.ts +5 -5
  89. package/dist/src/expr/ref.js +5 -5
  90. package/dist/src/expr/set.d.ts +96 -51
  91. package/dist/src/expr/set.d.ts.map +1 -1
  92. package/dist/src/expr/set.js +85 -29
  93. package/dist/src/expr/set.js.map +1 -1
  94. package/dist/src/expr/string.d.ts +28 -28
  95. package/dist/src/expr/string.js +28 -28
  96. package/dist/src/expr/struct.d.ts.map +1 -1
  97. package/dist/src/expr/struct.js +2 -2
  98. package/dist/src/expr/variant.d.ts +12 -12
  99. package/dist/src/expr/variant.js +7 -7
  100. package/dist/src/function_symbols.d.ts +28 -0
  101. package/dist/src/function_symbols.d.ts.map +1 -0
  102. package/dist/src/function_symbols.js +28 -0
  103. package/dist/src/function_symbols.js.map +1 -0
  104. package/dist/src/location.d.ts +32 -0
  105. package/dist/src/location.d.ts.map +1 -1
  106. package/dist/src/location.js +38 -0
  107. package/dist/src/location.js.map +1 -1
  108. package/dist/src/location.spec.js +89 -1
  109. package/dist/src/location.spec.js.map +1 -1
  110. package/dist/src/runner_protocol.d.ts +46 -5
  111. package/dist/src/runner_protocol.d.ts.map +1 -1
  112. package/dist/src/runner_protocol.js +24 -5
  113. package/dist/src/runner_protocol.js.map +1 -1
  114. package/dist/src/serialization/beast2/index.d.ts +1 -0
  115. package/dist/src/serialization/beast2/index.d.ts.map +1 -1
  116. package/dist/src/serialization/beast2/index.js +1 -0
  117. package/dist/src/serialization/beast2/index.js.map +1 -1
  118. package/dist/src/serialization/beast2/v5/canonical.d.ts +101 -0
  119. package/dist/src/serialization/beast2/v5/canonical.d.ts.map +1 -0
  120. package/dist/src/serialization/beast2/v5/canonical.js +436 -0
  121. package/dist/src/serialization/beast2/v5/canonical.js.map +1 -0
  122. package/dist/src/serialization/beast2/v5/canonical.spec.d.ts +6 -0
  123. package/dist/src/serialization/beast2/v5/canonical.spec.d.ts.map +1 -0
  124. package/dist/src/serialization/beast2/v5/canonical.spec.js +124 -0
  125. package/dist/src/serialization/beast2/v5/canonical.spec.js.map +1 -0
  126. package/dist/src/serialization/beast2/v5/elements.d.ts +3 -1
  127. package/dist/src/serialization/beast2/v5/elements.d.ts.map +1 -1
  128. package/dist/src/serialization/beast2/v5/elements.js +7 -2
  129. package/dist/src/serialization/beast2/v5/elements.js.map +1 -1
  130. package/dist/src/serialization/beast2/v5/elements.spec.js +1 -1
  131. package/dist/src/serialization/beast2/v5/elements.spec.js.map +1 -1
  132. package/dist/src/serialization/beast2/v5/intake.d.ts +98 -0
  133. package/dist/src/serialization/beast2/v5/intake.d.ts.map +1 -0
  134. package/dist/src/serialization/beast2/v5/intake.js +462 -0
  135. package/dist/src/serialization/beast2/v5/intake.js.map +1 -0
  136. package/dist/src/serialization/beast2/v5/intake.spec.d.ts +6 -0
  137. package/dist/src/serialization/beast2/v5/intake.spec.d.ts.map +1 -0
  138. package/dist/src/serialization/beast2/v5/intake.spec.js +202 -0
  139. package/dist/src/serialization/beast2/v5/intake.spec.js.map +1 -0
  140. package/dist/src/serialization/beast2/v5/runs.d.ts +6 -4
  141. package/dist/src/serialization/beast2/v5/runs.d.ts.map +1 -1
  142. package/dist/src/serialization/beast2/v5/runs.js +31 -5
  143. package/dist/src/serialization/beast2/v5/runs.js.map +1 -1
  144. package/dist/src/serialization/beast2/v5/runs.spec.js +23 -3
  145. package/dist/src/serialization/beast2/v5/runs.spec.js.map +1 -1
  146. package/dist/src/serialization/index.d.ts +1 -1
  147. package/dist/src/serialization/index.d.ts.map +1 -1
  148. package/dist/src/serialization/index.js +1 -1
  149. package/dist/src/serialization/index.js.map +1 -1
  150. package/package.json +1 -1
@@ -22,7 +22,7 @@ export default {
22
22
  * const fromEpoch = East.function([IntegerType], DateTimeType, ($, ms) => {
23
23
  * $.return(East.DateTime.fromEpochMilliseconds(ms));
24
24
  * });
25
- * const compiled = East.compile(fromEpoch.toIR(), []);
25
+ * const compiled = East.compile(fromEpoch, []);
26
26
  * compiled(0n); // 1970-01-01T00:00:00.000Z
27
27
  * compiled(1609459200000n); // 2021-01-01T00:00:00.000Z
28
28
  * ```
@@ -60,7 +60,7 @@ export default {
60
60
  * const makeDate = East.function([IntegerType], DateTimeType, ($, year) => {
61
61
  * $.return(East.DateTime.fromComponents(year, 1n, 15n));
62
62
  * });
63
- * const compiled = East.compile(makeDate.toIR(), []);
63
+ * const compiled = East.compile(makeDate, []);
64
64
  * compiled(2025n); // 2025-01-15T00:00:00.000Z
65
65
  * ```
66
66
  *
@@ -69,7 +69,7 @@ export default {
69
69
  * const makeDateTime = East.function([], DateTimeType, ($) => {
70
70
  * $.return(East.DateTime.fromComponents(2025n, 1n, 15n, 14n, 30n, 0n, 500n));
71
71
  * });
72
- * const compiled = East.compile(makeDateTime.toIR(), []);
72
+ * const compiled = East.compile(makeDateTime, []);
73
73
  * compiled(); // 2025-01-15T14:30:00.500Z
74
74
  * ```
75
75
  */
@@ -103,7 +103,7 @@ export default {
103
103
  * const parseDate = East.function([StringType], DateTimeType, ($, dateStr) => {
104
104
  * $.return(East.DateTime.parseFormatted(dateStr, "YYYY-MM-DD"));
105
105
  * });
106
- * const compiled = East.compile(parseDate.toIR(), []);
106
+ * const compiled = East.compile(parseDate, []);
107
107
  * compiled("2025-01-15"); // 2025-01-15T00:00:00.000Z
108
108
  * ```
109
109
  *
@@ -112,7 +112,7 @@ export default {
112
112
  * const parseDateTime = East.function([StringType], DateTimeType, ($, str) => {
113
113
  * $.return(East.DateTime.parseFormatted(str, "MM/DD/YYYY HH:mm"));
114
114
  * });
115
- * const compiled = East.compile(parseDateTime.toIR(), []);
115
+ * const compiled = East.compile(parseDateTime, []);
116
116
  * compiled("01/15/2025 14:30"); // 2025-01-15T14:30:00.000Z
117
117
  * ```
118
118
  */
@@ -129,7 +129,7 @@ export default {
129
129
  * const roundMs = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
130
130
  * $.return(East.DateTime.roundDownMillisecond(dt, step));
131
131
  * });
132
- * const compiled = East.compile(roundMs.toIR(), []);
132
+ * const compiled = East.compile(roundMs, []);
133
133
  * // Round down to nearest 100ms
134
134
  * compiled(East.DateTime.fromEpochMilliseconds(1234n), 100n); // Rounded to 1200ms
135
135
  * ```
@@ -152,7 +152,7 @@ export default {
152
152
  * const roundSec = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
153
153
  * $.return(East.DateTime.roundDownSecond(dt, step));
154
154
  * });
155
- * const compiled = East.compile(roundSec.toIR(), []);
155
+ * const compiled = East.compile(roundSec, []);
156
156
  * // Round down to nearest 30 seconds
157
157
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 45n), 30n); // Rounds to 30s
158
158
  * ```
@@ -176,7 +176,7 @@ export default {
176
176
  * const roundMin = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
177
177
  * $.return(East.DateTime.roundDownMinute(dt, step));
178
178
  * });
179
- * const compiled = East.compile(roundMin.toIR(), []);
179
+ * const compiled = East.compile(roundMin, []);
180
180
  * // Round down to nearest 15 minutes
181
181
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 22n), 15n); // Rounds to 15 min
182
182
  * ```
@@ -200,7 +200,7 @@ export default {
200
200
  * const roundHour = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
201
201
  * $.return(East.DateTime.roundDownHour(dt, step));
202
202
  * });
203
- * const compiled = East.compile(roundHour.toIR(), []);
203
+ * const compiled = East.compile(roundHour, []);
204
204
  * // Round down to nearest 6 hours
205
205
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 6n); // Rounds to 6:00
206
206
  * ```
@@ -224,7 +224,7 @@ export default {
224
224
  * const roundUpMs = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
225
225
  * $.return(East.DateTime.roundUpMillisecond(dt, step));
226
226
  * });
227
- * const compiled = East.compile(roundUpMs.toIR(), []);
227
+ * const compiled = East.compile(roundUpMs, []);
228
228
  * // Round up to nearest 100ms
229
229
  * compiled(East.DateTime.fromEpochMilliseconds(1234n), 100n); // Rounds to 1300ms
230
230
  * ```
@@ -247,7 +247,7 @@ export default {
247
247
  * const roundNearMs = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
248
248
  * $.return(East.DateTime.roundNearestMillisecond(dt, step));
249
249
  * });
250
- * const compiled = East.compile(roundNearMs.toIR(), []);
250
+ * const compiled = East.compile(roundNearMs, []);
251
251
  * // Round to nearest 100ms
252
252
  * compiled(East.DateTime.fromEpochMilliseconds(1234n), 100n); // Rounds to 1200ms
253
253
  * compiled(East.DateTime.fromEpochMilliseconds(1289n), 100n); // Rounds to 1300ms
@@ -272,7 +272,7 @@ export default {
272
272
  * const roundUpSec = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
273
273
  * $.return(East.DateTime.roundUpSecond(dt, step));
274
274
  * });
275
- * const compiled = East.compile(roundUpSec.toIR(), []);
275
+ * const compiled = East.compile(roundUpSec, []);
276
276
  * // Round up to nearest 30 seconds
277
277
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 15n), 30n); // Rounds to 30s
278
278
  * ```
@@ -296,7 +296,7 @@ export default {
296
296
  * const roundNearSec = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
297
297
  * $.return(East.DateTime.roundNearestSecond(dt, step));
298
298
  * });
299
- * const compiled = East.compile(roundNearSec.toIR(), []);
299
+ * const compiled = East.compile(roundNearSec, []);
300
300
  * // Round to nearest 30 seconds
301
301
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 22n), 30n); // Rounds to 30s
302
302
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 0n, 38n), 30n); // Rounds to 30s
@@ -322,7 +322,7 @@ export default {
322
322
  * const roundUpMin = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
323
323
  * $.return(East.DateTime.roundUpMinute(dt, step));
324
324
  * });
325
- * const compiled = East.compile(roundUpMin.toIR(), []);
325
+ * const compiled = East.compile(roundUpMin, []);
326
326
  * // Round up to nearest 15 minutes
327
327
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 22n), 15n); // Rounds to 30 min
328
328
  * ```
@@ -346,7 +346,7 @@ export default {
346
346
  * const roundNearMin = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
347
347
  * $.return(East.DateTime.roundNearestMinute(dt, step));
348
348
  * });
349
- * const compiled = East.compile(roundNearMin.toIR(), []);
349
+ * const compiled = East.compile(roundNearMin, []);
350
350
  * // Round to nearest 15 minutes
351
351
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 22n), 15n); // Rounds to 15 min
352
352
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 0n, 38n), 15n); // Rounds to 45 min
@@ -372,7 +372,7 @@ export default {
372
372
  * const roundUpHr = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
373
373
  * $.return(East.DateTime.roundUpHour(dt, step));
374
374
  * });
375
- * const compiled = East.compile(roundUpHr.toIR(), []);
375
+ * const compiled = East.compile(roundUpHr, []);
376
376
  * // Round up to nearest 6 hours
377
377
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 6n); // Rounds to 12:00
378
378
  * ```
@@ -396,7 +396,7 @@ export default {
396
396
  * const roundNearHr = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
397
397
  * $.return(East.DateTime.roundNearestHour(dt, step));
398
398
  * });
399
- * const compiled = East.compile(roundNearHr.toIR(), []);
399
+ * const compiled = East.compile(roundNearHr, []);
400
400
  * // Round to nearest 6 hours
401
401
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 6n); // Rounds to 6:00
402
402
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 10n), 6n); // Rounds to 12:00
@@ -422,7 +422,7 @@ export default {
422
422
  * const roundDownD = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
423
423
  * $.return(East.DateTime.roundDownDay(dt, step));
424
424
  * });
425
- * const compiled = East.compile(roundDownD.toIR(), []);
425
+ * const compiled = East.compile(roundDownD, []);
426
426
  * // Round down to nearest day
427
427
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 12n, 30n), 1n); // Rounds to start of day
428
428
  * ```
@@ -447,7 +447,7 @@ export default {
447
447
  * const roundUpD = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
448
448
  * $.return(East.DateTime.roundUpDay(dt, step));
449
449
  * });
450
- * const compiled = East.compile(roundUpD.toIR(), []);
450
+ * const compiled = East.compile(roundUpD, []);
451
451
  * // Round up to nearest day
452
452
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 12n, 30n), 1n); // Rounds to next day start
453
453
  * ```
@@ -471,7 +471,7 @@ export default {
471
471
  * const roundNearD = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
472
472
  * $.return(East.DateTime.roundNearestDay(dt, step));
473
473
  * });
474
- * const compiled = East.compile(roundNearD.toIR(), []);
474
+ * const compiled = East.compile(roundNearD, []);
475
475
  * // Round to nearest day
476
476
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 8n), 1n); // Rounds to start of day
477
477
  * compiled(East.DateTime.fromComponents(2025n, 1n, 1n, 16n), 1n); // Rounds to next day start
@@ -497,7 +497,7 @@ export default {
497
497
  * const roundDownWk = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
498
498
  * $.return(East.DateTime.roundDownWeek(dt, step));
499
499
  * });
500
- * const compiled = East.compile(roundDownWk.toIR(), []);
500
+ * const compiled = East.compile(roundDownWk, []);
501
501
  * // Round down to nearest Monday
502
502
  * compiled(East.DateTime.fromComponents(2025n, 1n, 3n), 1n); // Rounds to previous Monday
503
503
  * ```
@@ -527,7 +527,7 @@ export default {
527
527
  * const roundUpWk = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
528
528
  * $.return(East.DateTime.roundUpWeek(dt, step));
529
529
  * });
530
- * const compiled = East.compile(roundUpWk.toIR(), []);
530
+ * const compiled = East.compile(roundUpWk, []);
531
531
  * // Round up to nearest Monday
532
532
  * compiled(East.DateTime.fromComponents(2025n, 1n, 3n), 1n); // Rounds to next Monday
533
533
  * ```
@@ -557,7 +557,7 @@ export default {
557
557
  * const roundNearWk = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
558
558
  * $.return(East.DateTime.roundNearestWeek(dt, step));
559
559
  * });
560
- * const compiled = East.compile(roundNearWk.toIR(), []);
560
+ * const compiled = East.compile(roundNearWk, []);
561
561
  * // Round to nearest Monday
562
562
  * compiled(East.DateTime.fromComponents(2025n, 1n, 3n), 1n); // Rounds to closest Monday
563
563
  * ```
@@ -588,7 +588,7 @@ export default {
588
588
  * const roundDownMo = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
589
589
  * $.return(East.DateTime.roundDownMonth(dt, step));
590
590
  * });
591
- * const compiled = East.compile(roundDownMo.toIR(), []);
591
+ * const compiled = East.compile(roundDownMo, []);
592
592
  * // Round down to nearest month (first day of the month at midnight)
593
593
  * compiled(East.DateTime.fromComponents(2025n, 1n, 15n), 1n); // Rounds to Jan 1, 2025
594
594
  * // Round down to nearest quarter (Jan 1, Apr 1, Jul 1, Oct 1)
@@ -617,7 +617,7 @@ export default {
617
617
  * const roundDownYr = East.function([DateTimeType, IntegerType], DateTimeType, ($, dt, step) => {
618
618
  * $.return(East.DateTime.roundDownYear(dt, step));
619
619
  * });
620
- * const compiled = East.compile(roundDownYr.toIR(), []);
620
+ * const compiled = East.compile(roundDownYr, []);
621
621
  * // Round down to nearest year (January 1st at midnight)
622
622
  * compiled(East.DateTime.fromComponents(2025n, 6n, 15n), 1n); // Rounds to Jan 1, 2025
623
623
  * // Round down to nearest decade
@@ -39,7 +39,7 @@ declare const _default: {
39
39
  * ($, i) => i.multiply(10n)
40
40
  * ));
41
41
  * });
42
- * const compiled = East.compile(makeDict.toIR(), []);
42
+ * const compiled = East.compile(makeDict, []);
43
43
  * compiled(); // { "key0": 0n, "key1": 10n, "key2": 20n }
44
44
  * ```
45
45
  *
@@ -56,7 +56,7 @@ declare const _default: {
56
56
  * ($, oldVal, newVal, key) => oldVal.greaterThan(newVal).ifElse(() => oldVal, () => newVal)
57
57
  * ));
58
58
  * });
59
- * const compiled = East.compile(makeDictConflict.toIR(), []);
59
+ * const compiled = East.compile(makeDictConflict, []);
60
60
  * compiled(); // { 0n: 3n, 1n: 4n, 2n: 2n }
61
61
  * ```
62
62
  */
@@ -38,7 +38,7 @@ export default {
38
38
  * ($, i) => i.multiply(10n)
39
39
  * ));
40
40
  * });
41
- * const compiled = East.compile(makeDict.toIR(), []);
41
+ * const compiled = East.compile(makeDict, []);
42
42
  * compiled(); // { "key0": 0n, "key1": 10n, "key2": 20n }
43
43
  * ```
44
44
  *
@@ -55,7 +55,7 @@ export default {
55
55
  * ($, oldVal, newVal, key) => oldVal.greaterThan(newVal).ifElse(() => oldVal, () => newVal)
56
56
  * ));
57
57
  * });
58
- * const compiled = East.compile(makeDictConflict.toIR(), []);
58
+ * const compiled = East.compile(makeDictConflict, []);
59
59
  * compiled(); // { 0n: 3n, 1n: 4n, 2n: 2n }
60
60
  * ```
61
61
  */
@@ -18,7 +18,7 @@ declare const _default: {
18
18
  * const approxEq = East.function([FloatType, FloatType, FloatType], BooleanType, ($, x, y, eps) => {
19
19
  * $.return(East.Float.approxEqual(x, y, eps));
20
20
  * });
21
- * const compiled = East.compile(approxEq.toIR(), []);
21
+ * const compiled = East.compile(approxEq, []);
22
22
  * compiled(0.3, 0.1 + 0.2, 0.0001); // true (handles floating point precision)
23
23
  * compiled(1.0, 1.1, 0.05); // false
24
24
  * ```
@@ -35,7 +35,7 @@ declare const _default: {
35
35
  * const floor = East.function([FloatType], IntegerType, ($, x) => {
36
36
  * $.return(East.Float.roundFloor(x));
37
37
  * });
38
- * const compiled = East.compile(floor.toIR(), []);
38
+ * const compiled = East.compile(floor, []);
39
39
  * compiled(3.7); // 3n
40
40
  * compiled(-2.3); // -3n
41
41
  * ```
@@ -52,7 +52,7 @@ declare const _default: {
52
52
  * const ceil = East.function([FloatType], IntegerType, ($, x) => {
53
53
  * $.return(East.Float.roundCeil(x));
54
54
  * });
55
- * const compiled = East.compile(ceil.toIR(), []);
55
+ * const compiled = East.compile(ceil, []);
56
56
  * compiled(3.2); // 4n
57
57
  * compiled(-2.7); // -2n
58
58
  * ```
@@ -69,7 +69,7 @@ declare const _default: {
69
69
  * const roundHalf = East.function([FloatType], IntegerType, ($, x) => {
70
70
  * $.return(East.Float.roundHalf(x));
71
71
  * });
72
- * const compiled = East.compile(roundHalf.toIR(), []);
72
+ * const compiled = East.compile(roundHalf, []);
73
73
  * compiled(3.5); // 4n
74
74
  * compiled(3.4); // 3n
75
75
  * compiled(-2.5); // -3n
@@ -87,7 +87,7 @@ declare const _default: {
87
87
  * const trunc = East.function([FloatType], IntegerType, ($, x) => {
88
88
  * $.return(East.Float.roundTrunc(x));
89
89
  * });
90
- * const compiled = East.compile(trunc.toIR(), []);
90
+ * const compiled = East.compile(trunc, []);
91
91
  * compiled(3.7); // 3n
92
92
  * compiled(-2.7); // -2n
93
93
  * ```
@@ -106,7 +106,7 @@ declare const _default: {
106
106
  * const roundNearest = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
107
107
  * $.return(East.Float.roundNearest(x, step));
108
108
  * });
109
- * const compiled = East.compile(roundNearest.toIR(), []);
109
+ * const compiled = East.compile(roundNearest, []);
110
110
  * compiled(17.3, 5.0); // 15.0
111
111
  * compiled(17.6, 5.0); // 20.0
112
112
  * compiled(3.14159, 0.01); // 3.14
@@ -126,7 +126,7 @@ declare const _default: {
126
126
  * const roundUp = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
127
127
  * $.return(East.Float.roundUp(x, step));
128
128
  * });
129
- * const compiled = East.compile(roundUp.toIR(), []);
129
+ * const compiled = East.compile(roundUp, []);
130
130
  * compiled(17.1, 5.0); // 20.0
131
131
  * compiled(15.0, 5.0); // 15.0 (already exact)
132
132
  * compiled(3.14, 0.1); // 3.2
@@ -146,7 +146,7 @@ declare const _default: {
146
146
  * const roundDown = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
147
147
  * $.return(East.Float.roundDown(x, step));
148
148
  * });
149
- * const compiled = East.compile(roundDown.toIR(), []);
149
+ * const compiled = East.compile(roundDown, []);
150
150
  * compiled(17.9, 5.0); // 15.0
151
151
  * compiled(15.0, 5.0); // 15.0 (already exact)
152
152
  * compiled(3.19, 0.1); // 3.1
@@ -166,7 +166,7 @@ declare const _default: {
166
166
  * const roundTruncate = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
167
167
  * $.return(East.Float.roundTruncate(x, step));
168
168
  * });
169
- * const compiled = East.compile(roundTruncate.toIR(), []);
169
+ * const compiled = East.compile(roundTruncate, []);
170
170
  * compiled(17.9, 5.0); // 15.0
171
171
  * compiled(-17.9, 5.0); // -15.0
172
172
  * ```
@@ -185,7 +185,7 @@ declare const _default: {
185
185
  * const roundDecimals = East.function([FloatType, IntegerType], FloatType, ($, x, decimals) => {
186
186
  * $.return(East.Float.roundToDecimals(x, decimals));
187
187
  * });
188
- * const compiled = East.compile(roundDecimals.toIR(), []);
188
+ * const compiled = East.compile(roundDecimals, []);
189
189
  * compiled(3.14159, 2n); // 3.14
190
190
  * compiled(2.5, 0n); // 3.0
191
191
  * ```
@@ -204,7 +204,7 @@ declare const _default: {
204
204
  * const formatComma = East.function([FloatType, IntegerType], StringType, ($, x, decimals) => {
205
205
  * $.return(East.Float.printCommaSeperated(x, decimals));
206
206
  * });
207
- * const compiled = East.compile(formatComma.toIR(), []);
207
+ * const compiled = East.compile(formatComma, []);
208
208
  * compiled(1234.567, 2n); // "1,234.57"
209
209
  * compiled(1000000, 0n); // "1,000,000"
210
210
  * compiled(-5432.1, 3n); // "-5,432.100"
@@ -223,7 +223,7 @@ declare const _default: {
223
223
  * const formatCurrency = East.function([FloatType], StringType, ($, x) => {
224
224
  * $.return(East.Float.printCurrency(x));
225
225
  * });
226
- * const compiled = East.compile(formatCurrency.toIR(), []);
226
+ * const compiled = East.compile(formatCurrency, []);
227
227
  * compiled(1234.567); // "$1,234.57"
228
228
  * compiled(-42.5); // "-$42.50"
229
229
  * compiled(1000000); // "$1,000,000.00"
@@ -243,7 +243,7 @@ declare const _default: {
243
243
  * const formatFixed = East.function([FloatType, IntegerType], StringType, ($, x, decimals) => {
244
244
  * $.return(East.Float.printFixed(x, decimals));
245
245
  * });
246
- * const compiled = East.compile(formatFixed.toIR(), []);
246
+ * const compiled = East.compile(formatFixed, []);
247
247
  * compiled(3.14159, 2n); // "3.14"
248
248
  * compiled(42, 3n); // "42.000"
249
249
  * compiled(-0.5, 1n); // "-0.5"
@@ -265,7 +265,7 @@ declare const _default: {
265
265
  * const formatCompact = East.function([FloatType], StringType, ($, x) => {
266
266
  * $.return(East.Float.printCompact(x));
267
267
  * });
268
- * const compiled = East.compile(formatCompact.toIR(), []);
268
+ * const compiled = East.compile(formatCompact, []);
269
269
  * compiled(1500); // "1.5K"
270
270
  * compiled(2500000); // "2.5M"
271
271
  * compiled(3140000000); // "3.14B"
@@ -287,7 +287,7 @@ declare const _default: {
287
287
  * const formatPercent = East.function([FloatType, IntegerType], StringType, ($, x, decimals) => {
288
288
  * $.return(East.Float.printPercentage(x, decimals));
289
289
  * });
290
- * const compiled = East.compile(formatPercent.toIR(), []);
290
+ * const compiled = East.compile(formatPercent, []);
291
291
  * compiled(0.452, 1n); // "45.2%"
292
292
  * compiled(0.5, 0n); // "50%"
293
293
  * compiled(-0.123, 2n); // "-12.30%"
@@ -19,7 +19,7 @@ export default {
19
19
  * const approxEq = East.function([FloatType, FloatType, FloatType], BooleanType, ($, x, y, eps) => {
20
20
  * $.return(East.Float.approxEqual(x, y, eps));
21
21
  * });
22
- * const compiled = East.compile(approxEq.toIR(), []);
22
+ * const compiled = East.compile(approxEq, []);
23
23
  * compiled(0.3, 0.1 + 0.2, 0.0001); // true (handles floating point precision)
24
24
  * compiled(1.0, 1.1, 0.05); // false
25
25
  * ```
@@ -39,7 +39,7 @@ export default {
39
39
  * const floor = East.function([FloatType], IntegerType, ($, x) => {
40
40
  * $.return(East.Float.roundFloor(x));
41
41
  * });
42
- * const compiled = East.compile(floor.toIR(), []);
42
+ * const compiled = East.compile(floor, []);
43
43
  * compiled(3.7); // 3n
44
44
  * compiled(-2.3); // -3n
45
45
  * ```
@@ -61,7 +61,7 @@ export default {
61
61
  * const ceil = East.function([FloatType], IntegerType, ($, x) => {
62
62
  * $.return(East.Float.roundCeil(x));
63
63
  * });
64
- * const compiled = East.compile(ceil.toIR(), []);
64
+ * const compiled = East.compile(ceil, []);
65
65
  * compiled(3.2); // 4n
66
66
  * compiled(-2.7); // -2n
67
67
  * ```
@@ -84,7 +84,7 @@ export default {
84
84
  * const roundHalf = East.function([FloatType], IntegerType, ($, x) => {
85
85
  * $.return(East.Float.roundHalf(x));
86
86
  * });
87
- * const compiled = East.compile(roundHalf.toIR(), []);
87
+ * const compiled = East.compile(roundHalf, []);
88
88
  * compiled(3.5); // 4n
89
89
  * compiled(3.4); // 3n
90
90
  * compiled(-2.5); // -3n
@@ -105,7 +105,7 @@ export default {
105
105
  * const trunc = East.function([FloatType], IntegerType, ($, x) => {
106
106
  * $.return(East.Float.roundTrunc(x));
107
107
  * });
108
- * const compiled = East.compile(trunc.toIR(), []);
108
+ * const compiled = East.compile(trunc, []);
109
109
  * compiled(3.7); // 3n
110
110
  * compiled(-2.7); // -2n
111
111
  * ```
@@ -127,7 +127,7 @@ export default {
127
127
  * const roundNearest = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
128
128
  * $.return(East.Float.roundNearest(x, step));
129
129
  * });
130
- * const compiled = East.compile(roundNearest.toIR(), []);
130
+ * const compiled = East.compile(roundNearest, []);
131
131
  * compiled(17.3, 5.0); // 15.0
132
132
  * compiled(17.6, 5.0); // 20.0
133
133
  * compiled(3.14159, 0.01); // 3.14
@@ -164,7 +164,7 @@ export default {
164
164
  * const roundUp = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
165
165
  * $.return(East.Float.roundUp(x, step));
166
166
  * });
167
- * const compiled = East.compile(roundUp.toIR(), []);
167
+ * const compiled = East.compile(roundUp, []);
168
168
  * compiled(17.1, 5.0); // 20.0
169
169
  * compiled(15.0, 5.0); // 15.0 (already exact)
170
170
  * compiled(3.14, 0.1); // 3.2
@@ -199,7 +199,7 @@ export default {
199
199
  * const roundDown = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
200
200
  * $.return(East.Float.roundDown(x, step));
201
201
  * });
202
- * const compiled = East.compile(roundDown.toIR(), []);
202
+ * const compiled = East.compile(roundDown, []);
203
203
  * compiled(17.9, 5.0); // 15.0
204
204
  * compiled(15.0, 5.0); // 15.0 (already exact)
205
205
  * compiled(3.19, 0.1); // 3.1
@@ -234,7 +234,7 @@ export default {
234
234
  * const roundTruncate = East.function([FloatType, FloatType], FloatType, ($, x, step) => {
235
235
  * $.return(East.Float.roundTruncate(x, step));
236
236
  * });
237
- * const compiled = East.compile(roundTruncate.toIR(), []);
237
+ * const compiled = East.compile(roundTruncate, []);
238
238
  * compiled(17.9, 5.0); // 15.0
239
239
  * compiled(-17.9, 5.0); // -15.0
240
240
  * ```
@@ -263,7 +263,7 @@ export default {
263
263
  * const roundDecimals = East.function([FloatType, IntegerType], FloatType, ($, x, decimals) => {
264
264
  * $.return(East.Float.roundToDecimals(x, decimals));
265
265
  * });
266
- * const compiled = East.compile(roundDecimals.toIR(), []);
266
+ * const compiled = East.compile(roundDecimals, []);
267
267
  * compiled(3.14159, 2n); // 3.14
268
268
  * compiled(2.5, 0n); // 3.0
269
269
  * ```
@@ -303,7 +303,7 @@ export default {
303
303
  * const formatComma = East.function([FloatType, IntegerType], StringType, ($, x, decimals) => {
304
304
  * $.return(East.Float.printCommaSeperated(x, decimals));
305
305
  * });
306
- * const compiled = East.compile(formatComma.toIR(), []);
306
+ * const compiled = East.compile(formatComma, []);
307
307
  * compiled(1234.567, 2n); // "1,234.57"
308
308
  * compiled(1000000, 0n); // "1,000,000"
309
309
  * compiled(-5432.1, 3n); // "-5,432.100"
@@ -370,7 +370,7 @@ export default {
370
370
  * const formatCurrency = East.function([FloatType], StringType, ($, x) => {
371
371
  * $.return(East.Float.printCurrency(x));
372
372
  * });
373
- * const compiled = East.compile(formatCurrency.toIR(), []);
373
+ * const compiled = East.compile(formatCurrency, []);
374
374
  * compiled(1234.567); // "$1,234.57"
375
375
  * compiled(-42.5); // "-$42.50"
376
376
  * compiled(1000000); // "$1,000,000.00"
@@ -423,7 +423,7 @@ export default {
423
423
  * const formatFixed = East.function([FloatType, IntegerType], StringType, ($, x, decimals) => {
424
424
  * $.return(East.Float.printFixed(x, decimals));
425
425
  * });
426
- * const compiled = East.compile(formatFixed.toIR(), []);
426
+ * const compiled = East.compile(formatFixed, []);
427
427
  * compiled(3.14159, 2n); // "3.14"
428
428
  * compiled(42, 3n); // "42.000"
429
429
  * compiled(-0.5, 1n); // "-0.5"
@@ -476,7 +476,7 @@ export default {
476
476
  * const formatCompact = East.function([FloatType], StringType, ($, x) => {
477
477
  * $.return(East.Float.printCompact(x));
478
478
  * });
479
- * const compiled = East.compile(formatCompact.toIR(), []);
479
+ * const compiled = East.compile(formatCompact, []);
480
480
  * compiled(1500); // "1.5K"
481
481
  * compiled(2500000); // "2.5M"
482
482
  * compiled(3140000000); // "3.14B"
@@ -535,7 +535,7 @@ export default {
535
535
  * const formatPercent = East.function([FloatType, IntegerType], StringType, ($, x, decimals) => {
536
536
  * $.return(East.Float.printPercentage(x, decimals));
537
537
  * });
538
- * const compiled = East.compile(formatPercent.toIR(), []);
538
+ * const compiled = East.compile(formatPercent, []);
539
539
  * compiled(0.452, 1n); // "45.2%"
540
540
  * compiled(0.5, 0n); // "50%"
541
541
  * compiled(-0.123, 2n); // "-12.30%"
@@ -16,7 +16,7 @@ declare const _default: {
16
16
  * const formatComma = East.function([IntegerType], StringType, ($, x) => {
17
17
  * $.return(East.Integer.printCommaSeperated(x));
18
18
  * });
19
- * const compiled = East.compile(formatComma.toIR(), []);
19
+ * const compiled = East.compile(formatComma, []);
20
20
  * compiled(1234567n); // "1,234,567"
21
21
  * compiled(1000n); // "1,000"
22
22
  * compiled(-5432n); // "-5,432"
@@ -35,7 +35,7 @@ declare const _default: {
35
35
  * const formatCurrency = East.function([IntegerType], StringType, ($, x) => {
36
36
  * $.return(East.Integer.printCurrency(x));
37
37
  * });
38
- * const compiled = East.compile(formatCurrency.toIR(), []);
38
+ * const compiled = East.compile(formatCurrency, []);
39
39
  * compiled(1234n); // "$1,234"
40
40
  * compiled(-42n); // "-$42"
41
41
  * compiled(1000000n); // "$1,000,000"
@@ -56,7 +56,7 @@ declare const _default: {
56
56
  * const formatCompact = East.function([IntegerType], StringType, ($, x) => {
57
57
  * $.return(East.Integer.printCompact(x));
58
58
  * });
59
- * const compiled = East.compile(formatCompact.toIR(), []);
59
+ * const compiled = East.compile(formatCompact, []);
60
60
  * compiled(1500n); // "1.5K"
61
61
  * compiled(2500000n); // "2.5M"
62
62
  * compiled(3140000000n); // "3.14B"
@@ -79,7 +79,7 @@ declare const _default: {
79
79
  * const formatSI = East.function([IntegerType], StringType, ($, x) => {
80
80
  * $.return(East.Integer.printCompactSI(x));
81
81
  * });
82
- * const compiled = East.compile(formatSI.toIR(), []);
82
+ * const compiled = East.compile(formatSI, []);
83
83
  * compiled(1500n); // "1.5k"
84
84
  * compiled(2500000n); // "2.5M"
85
85
  * compiled(3140000000n); // "3.14G"
@@ -101,7 +101,7 @@ declare const _default: {
101
101
  * const formatComputing = East.function([IntegerType], StringType, ($, x) => {
102
102
  * $.return(East.Integer.printCompactComputing(x));
103
103
  * });
104
- * const compiled = East.compile(formatComputing.toIR(), []);
104
+ * const compiled = East.compile(formatComputing, []);
105
105
  * compiled(1536n); // "1.5ki" (1536 bytes = 1.5 KiB)
106
106
  * compiled(2621440n); // "2.5Mi" (2.5 MiB)
107
107
  * compiled(3221225472n); // "3Gi" (3 GiB)
@@ -119,7 +119,7 @@ declare const _default: {
119
119
  * const formatOrdinal = East.function([IntegerType], StringType, ($, x) => {
120
120
  * $.return(East.Integer.printOrdinal(x));
121
121
  * });
122
- * const compiled = East.compile(formatOrdinal.toIR(), []);
122
+ * const compiled = East.compile(formatOrdinal, []);
123
123
  * compiled(1n); // "1st"
124
124
  * compiled(2n); // "2nd"
125
125
  * compiled(3n); // "3rd"
@@ -140,7 +140,7 @@ declare const _default: {
140
140
  * const countDigits = East.function([IntegerType], IntegerType, ($, x) => {
141
141
  * $.return(East.Integer.digitCount(x));
142
142
  * });
143
- * const compiled = East.compile(countDigits.toIR(), []);
143
+ * const compiled = East.compile(countDigits, []);
144
144
  * compiled(0n); // 1n
145
145
  * compiled(42n); // 2n
146
146
  * compiled(-1234n); // 4n
@@ -160,7 +160,7 @@ declare const _default: {
160
160
  * const roundNearest = East.function([IntegerType, IntegerType], IntegerType, ($, x, step) => {
161
161
  * $.return(East.Integer.roundNearest(x, step));
162
162
  * });
163
- * const compiled = East.compile(roundNearest.toIR(), []);
163
+ * const compiled = East.compile(roundNearest, []);
164
164
  * compiled(17n, 5n); // 15n
165
165
  * compiled(18n, 5n); // 20n
166
166
  * compiled(-17n, 5n); // -15n
@@ -179,7 +179,7 @@ declare const _default: {
179
179
  * const roundUp = East.function([IntegerType, IntegerType], IntegerType, ($, x, step) => {
180
180
  * $.return(East.Integer.roundUp(x, step));
181
181
  * });
182
- * const compiled = East.compile(roundUp.toIR(), []);
182
+ * const compiled = East.compile(roundUp, []);
183
183
  * compiled(17n, 5n); // 20n
184
184
  * compiled(15n, 5n); // 15n (already exact)
185
185
  * compiled(-17n, 5n); // -15n (towards zero for negatives)
@@ -198,7 +198,7 @@ declare const _default: {
198
198
  * const roundDown = East.function([IntegerType, IntegerType], IntegerType, ($, x, step) => {
199
199
  * $.return(East.Integer.roundDown(x, step));
200
200
  * });
201
- * const compiled = East.compile(roundDown.toIR(), []);
201
+ * const compiled = East.compile(roundDown, []);
202
202
  * compiled(17n, 5n); // 15n
203
203
  * compiled(15n, 5n); // 15n (already exact)
204
204
  * compiled(-17n, 5n); // -20n (away from zero for negatives)
@@ -217,7 +217,7 @@ declare const _default: {
217
217
  * const roundTruncate = East.function([IntegerType, IntegerType], IntegerType, ($, x, step) => {
218
218
  * $.return(East.Integer.roundTruncate(x, step));
219
219
  * });
220
- * const compiled = East.compile(roundTruncate.toIR(), []);
220
+ * const compiled = East.compile(roundTruncate, []);
221
221
  * compiled(17n, 5n); // 15n
222
222
  * compiled(-17n, 5n); // -15n
223
223
  * compiled(3n, 5n); // 0n
@@ -235,7 +235,7 @@ declare const _default: {
235
235
  * const formatPercent = East.function([IntegerType], StringType, ($, x) => {
236
236
  * $.return(East.Integer.printPercentage(x));
237
237
  * });
238
- * const compiled = East.compile(formatPercent.toIR(), []);
238
+ * const compiled = East.compile(formatPercent, []);
239
239
  * compiled(45n); // "45%"
240
240
  * compiled(100n); // "100%"
241
241
  * compiled(-25n); // "-25%"