@northtalk/ts 0.5.0 → 0.5.1

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 (70) hide show
  1. package/README.md +11 -0
  2. package/base64-CDO-a06R.js +29 -0
  3. package/{binary-value-B3knLdHD.d.ts → binary-value-xvJoGg0C.d.ts} +1 -1
  4. package/{checker-DMI4LiRm.js → checker-CUhn2XaM.js} +4 -4
  5. package/{core-D_9OuTRE.d.ts → core-BuTAYRm-.d.ts} +1 -1
  6. package/{debug-nN5tQ_p4.d.ts → debug-DRhMZAxw.d.ts} +24 -8
  7. package/debug.d.ts +1 -1
  8. package/debug.js +1 -1
  9. package/{driver-Bf-7Roq6.d.ts → driver-CHDcuqUy.d.ts} +1 -1
  10. package/driver.d.ts +1 -1
  11. package/driver.js +1 -1
  12. package/{encoding-C3Q7pIC9.js → encoding-RUuES_e4.js} +2 -2
  13. package/{engine-BpdGfAND.js → engine-CXf5FCwi.js} +6 -6
  14. package/{engine-CQqt4rTB.d.ts → engine-Cc3yofGM.d.ts} +2 -2
  15. package/{errors-BKJES3Zu.js → errors-D11zizZg.js} +1580 -1481
  16. package/{group-Bz2wh72R.js → group-BflSou2n.js} +45 -33
  17. package/http-fetch-DFwVIOQg.js +517 -0
  18. package/http.d.ts +39 -2
  19. package/http.js +189 -6
  20. package/index.d.ts +10 -660
  21. package/index.js +36 -49
  22. package/{inline-grants-Cx0Z9XAt.js → inline-grants-XbX9HL_w.js} +72 -304
  23. package/lean-BebPaTMK.js +47 -0
  24. package/lean-CjWVuOrC.d.ts +741 -0
  25. package/lean.d.ts +8 -0
  26. package/lean.js +15 -0
  27. package/{manifest-Dw-8Unmf.js → manifest-CCfpn0kC.js} +3 -4
  28. package/{manifest-DYAbIyQm.d.ts → manifest-DVrx-pT2.d.ts} +2 -2
  29. package/message-layer.d.ts +2 -2
  30. package/message-layer.js +2 -2
  31. package/notify.d.ts +1 -1
  32. package/notify.js +1 -1
  33. package/{objects-BRcpeXwZ.d.ts → objects-DC6HjzBY.d.ts} +1 -1
  34. package/{objects-BC4fS0vq.js → objects-DmUc0lha.js} +1 -1
  35. package/{base64-Dtqaz_0A.js → operations-DnCcztkZ.js} +1632 -32
  36. package/package.json +36 -2
  37. package/{readers-B5e5bBrY.js → readers-CsvlahLi.js} +2 -2
  38. package/{readers-L90Hoa97.d.ts → readers-MmyZ_d0w.d.ts} +1 -1
  39. package/{request-pump-binary-BjnyqXV5.js → request-pump-binary-oqjWFqZA.js} +5 -4
  40. package/{router-BCHEfs4x.js → router-BZ-aYeXA.js} +4 -4
  41. package/{router-CBuMIl6i.d.ts → router-D56rSkU8.d.ts} +2 -2
  42. package/session.d.ts +2 -2
  43. package/session.js +54 -15
  44. package/setup.d.ts +1 -1
  45. package/setup.js +4 -4
  46. package/sqlite.d.ts +2 -2
  47. package/sqlite.js +5 -5
  48. package/stdlib/bytes.d.ts +6 -0
  49. package/stdlib/bytes.js +11 -0
  50. package/stdlib/date.d.ts +6 -0
  51. package/stdlib/date.js +11 -0
  52. package/stdlib/json.d.ts +6 -0
  53. package/stdlib/json.js +11 -0
  54. package/stdlib/list.d.ts +6 -0
  55. package/stdlib/list.js +10 -0
  56. package/stdlib/map.d.ts +6 -0
  57. package/stdlib/map.js +10 -0
  58. package/stdlib/text.d.ts +6 -0
  59. package/stdlib/text.js +10 -0
  60. package/stdlib/units.d.ts +6 -0
  61. package/stdlib/units.js +10 -0
  62. package/stdlib-registry-BwitI3Ox.d.ts +18 -0
  63. package/{store-DTQa0lyE.js → store-DHlo6fP5.js} +2 -2
  64. package/{store-capability-BxXgiRM7.js → store-capability-BrUUAwVS.js} +3 -4
  65. package/store.d.ts +2 -2
  66. package/store.js +2 -2
  67. package/{user-capability-5-IvCeZI.js → user-capability-BcRQyyEw.js} +4 -5
  68. package/wasm.d.ts +5 -5
  69. package/wasm.js +12 -11
  70. package/capabilities-Bi5Qm6Fr.js +0 -1320
@@ -0,0 +1,741 @@
1
+ /// <reference lib="esnext.disposable" />
2
+ import { Er as Token, Or as SyntaxErrorCode, Sr as SourceSpan, Zt as Core, kr as SyntaxNode, mr as LibraryExport, rr as CodeUnit, ur as Binding, xr as SemanticTree, yt as GrantDecls } from "./debug-DRhMZAxw.js";
3
+ import { r as DrivenGroupOptions } from "./driver-CHDcuqUy.js";
4
+ import { c as DrivenGroup } from "./manifest-DVrx-pT2.js";
5
+ //#region src/generated/syntax.d.ts
6
+ declare const grammar: {
7
+ reserved: string[];
8
+ labels: {
9
+ reserved: string[];
10
+ excluded: string[];
11
+ };
12
+ chunk: {
13
+ singular: string;
14
+ plural: string;
15
+ }[];
16
+ ordinals: string[];
17
+ properties: string[];
18
+ follow: string[];
19
+ decision: string[];
20
+ text_patterns: {
21
+ keywords: string[];
22
+ classes: string[];
23
+ anchors: string[];
24
+ phrases: string[];
25
+ };
26
+ binary_patterns: {
27
+ integer_types: string[];
28
+ size_units: string[];
29
+ byte_orders: string[];
30
+ };
31
+ };
32
+ declare const units: ({
33
+ name: string;
34
+ kind: string;
35
+ calendar: boolean;
36
+ factor: string[];
37
+ plural?: undefined;
38
+ } | {
39
+ name: string;
40
+ plural: string;
41
+ kind: string;
42
+ calendar: boolean;
43
+ factor: string[];
44
+ })[];
45
+ declare const diagnosticCodes: readonly ["unknown name", "not a value", "name clash", "duplicate name", "duplicate offer", "not in recovery", "leaves recovery catch", "duplicate key", "unknown kind", "no conversion", "bad number", "pattern too large", "wrong argument count", "wrong argument", "wrong labels", "unknown operation", "wrong mode", "missing and wait", "needless and wait", "can't suspend here", "unknown import", "import cycle", "missing grant", "not in a library", "not in a script", "not in a lambda", "not in a guard", "not in a whose", "not in a join", "empty join", "not in a timeout", "empty timeout", "leaves finally", "outside a loop", "veto outside a decision", "after a suspension", "wrong message", "bad suffixes", "can't write", "not a property", "not constant", "default order", "initialiser failed", "nothing to fold", "no item chunk", "capture in repetition", "rest not last", "bits not whole bytes"];
46
+ declare const builtins: readonly [{
47
+ readonly name: "min";
48
+ readonly kind: "function";
49
+ readonly contract: {
50
+ readonly required: 1;
51
+ readonly total: 1;
52
+ readonly variadic: true;
53
+ };
54
+ }, {
55
+ readonly name: "max";
56
+ readonly kind: "function";
57
+ readonly contract: {
58
+ readonly required: 1;
59
+ readonly total: 1;
60
+ readonly variadic: true;
61
+ };
62
+ }, {
63
+ readonly name: "codePoint";
64
+ readonly kind: "function";
65
+ readonly contract: {
66
+ readonly required: 1;
67
+ readonly total: 1;
68
+ readonly variadic: false;
69
+ };
70
+ }, {
71
+ readonly name: "fromCodePoint";
72
+ readonly kind: "function";
73
+ readonly contract: {
74
+ readonly required: 1;
75
+ readonly total: 1;
76
+ readonly variadic: false;
77
+ };
78
+ }, {
79
+ readonly name: "upper";
80
+ readonly kind: "function";
81
+ readonly contract: {
82
+ readonly required: 1;
83
+ readonly total: 1;
84
+ readonly variadic: false;
85
+ };
86
+ }, {
87
+ readonly name: "lower";
88
+ readonly kind: "function";
89
+ readonly contract: {
90
+ readonly required: 1;
91
+ readonly total: 1;
92
+ readonly variadic: false;
93
+ };
94
+ }, {
95
+ readonly name: "offset";
96
+ readonly kind: "function";
97
+ readonly contract: {
98
+ readonly required: 2;
99
+ readonly total: 2;
100
+ readonly variadic: false;
101
+ };
102
+ }, {
103
+ readonly name: "isDisposed";
104
+ readonly kind: "function";
105
+ readonly contract: {
106
+ readonly required: 1;
107
+ readonly total: 1;
108
+ readonly variadic: false;
109
+ };
110
+ }, {
111
+ readonly name: "objectKind";
112
+ readonly kind: "function";
113
+ readonly contract: {
114
+ readonly required: 1;
115
+ readonly total: 1;
116
+ readonly variadic: false;
117
+ };
118
+ }, {
119
+ readonly name: "rangeStart";
120
+ readonly kind: "function";
121
+ readonly contract: {
122
+ readonly required: 1;
123
+ readonly total: 1;
124
+ readonly variadic: false;
125
+ };
126
+ }, {
127
+ readonly name: "rangeEnd";
128
+ readonly kind: "function";
129
+ readonly contract: {
130
+ readonly required: 1;
131
+ readonly total: 1;
132
+ readonly variadic: false;
133
+ };
134
+ }, {
135
+ readonly name: "kindOf";
136
+ readonly kind: "function";
137
+ readonly contract: {
138
+ readonly required: 1;
139
+ readonly total: 1;
140
+ readonly variadic: false;
141
+ };
142
+ }, {
143
+ readonly name: "conforms";
144
+ readonly kind: "function";
145
+ readonly contract: {
146
+ readonly required: 2;
147
+ readonly total: 2;
148
+ readonly variadic: false;
149
+ };
150
+ }, {
151
+ readonly name: "check";
152
+ readonly kind: "function";
153
+ readonly contract: {
154
+ readonly required: 2;
155
+ readonly total: 2;
156
+ readonly variadic: false;
157
+ };
158
+ }, {
159
+ readonly name: "explain";
160
+ readonly kind: "function";
161
+ readonly contract: {
162
+ readonly required: 2;
163
+ readonly total: 2;
164
+ readonly variadic: false;
165
+ };
166
+ }, {
167
+ readonly name: "functionArity";
168
+ readonly kind: "function";
169
+ readonly contract: {
170
+ readonly required: 1;
171
+ readonly total: 1;
172
+ readonly variadic: false;
173
+ };
174
+ }, {
175
+ readonly name: "functionName";
176
+ readonly kind: "function";
177
+ readonly contract: {
178
+ readonly required: 1;
179
+ readonly total: 1;
180
+ readonly variadic: false;
181
+ };
182
+ }, {
183
+ readonly name: "abs";
184
+ readonly kind: "function";
185
+ readonly contract: {
186
+ readonly required: 1;
187
+ readonly total: 1;
188
+ readonly variadic: false;
189
+ };
190
+ }, {
191
+ readonly name: "floor";
192
+ readonly kind: "function";
193
+ readonly contract: {
194
+ readonly required: 1;
195
+ readonly total: 1;
196
+ readonly variadic: false;
197
+ };
198
+ }, {
199
+ readonly name: "ceiling";
200
+ readonly kind: "function";
201
+ readonly contract: {
202
+ readonly required: 1;
203
+ readonly total: 1;
204
+ readonly variadic: false;
205
+ };
206
+ }, {
207
+ readonly name: "truncate";
208
+ readonly kind: "function";
209
+ readonly contract: {
210
+ readonly required: 1;
211
+ readonly total: 1;
212
+ readonly variadic: false;
213
+ };
214
+ }, {
215
+ readonly name: "round";
216
+ readonly kind: "function";
217
+ readonly contract: {
218
+ readonly required: 1;
219
+ readonly total: 3;
220
+ readonly variadic: false;
221
+ };
222
+ }, {
223
+ readonly name: "sqrt";
224
+ readonly kind: "function";
225
+ readonly contract: {
226
+ readonly required: 1;
227
+ readonly total: 1;
228
+ readonly variadic: false;
229
+ };
230
+ }, {
231
+ readonly name: "exp";
232
+ readonly kind: "function";
233
+ readonly contract: {
234
+ readonly required: 1;
235
+ readonly total: 1;
236
+ readonly variadic: false;
237
+ };
238
+ }, {
239
+ readonly name: "ln";
240
+ readonly kind: "function";
241
+ readonly contract: {
242
+ readonly required: 1;
243
+ readonly total: 1;
244
+ readonly variadic: false;
245
+ };
246
+ }, {
247
+ readonly name: "log10";
248
+ readonly kind: "function";
249
+ readonly contract: {
250
+ readonly required: 1;
251
+ readonly total: 1;
252
+ readonly variadic: false;
253
+ };
254
+ }, {
255
+ readonly name: "power";
256
+ readonly kind: "function";
257
+ readonly contract: {
258
+ readonly required: 2;
259
+ readonly total: 2;
260
+ readonly variadic: false;
261
+ };
262
+ }, {
263
+ readonly name: "sin";
264
+ readonly kind: "function";
265
+ readonly contract: {
266
+ readonly required: 1;
267
+ readonly total: 1;
268
+ readonly variadic: false;
269
+ };
270
+ }, {
271
+ readonly name: "cos";
272
+ readonly kind: "function";
273
+ readonly contract: {
274
+ readonly required: 1;
275
+ readonly total: 1;
276
+ readonly variadic: false;
277
+ };
278
+ }, {
279
+ readonly name: "tan";
280
+ readonly kind: "function";
281
+ readonly contract: {
282
+ readonly required: 1;
283
+ readonly total: 1;
284
+ readonly variadic: false;
285
+ };
286
+ }, {
287
+ readonly name: "asin";
288
+ readonly kind: "function";
289
+ readonly contract: {
290
+ readonly required: 1;
291
+ readonly total: 1;
292
+ readonly variadic: false;
293
+ };
294
+ }, {
295
+ readonly name: "acos";
296
+ readonly kind: "function";
297
+ readonly contract: {
298
+ readonly required: 1;
299
+ readonly total: 1;
300
+ readonly variadic: false;
301
+ };
302
+ }, {
303
+ readonly name: "atan";
304
+ readonly kind: "function";
305
+ readonly contract: {
306
+ readonly required: 1;
307
+ readonly total: 1;
308
+ readonly variadic: false;
309
+ };
310
+ }, {
311
+ readonly name: "atan2";
312
+ readonly kind: "function";
313
+ readonly contract: {
314
+ readonly required: 2;
315
+ readonly total: 2;
316
+ readonly variadic: false;
317
+ };
318
+ }, {
319
+ readonly name: "degrees";
320
+ readonly kind: "function";
321
+ readonly contract: {
322
+ readonly required: 1;
323
+ readonly total: 1;
324
+ readonly variadic: false;
325
+ };
326
+ }, {
327
+ readonly name: "radians";
328
+ readonly kind: "function";
329
+ readonly contract: {
330
+ readonly required: 1;
331
+ readonly total: 1;
332
+ readonly variadic: false;
333
+ };
334
+ }, {
335
+ readonly name: "random";
336
+ readonly kind: "function";
337
+ readonly contract: {
338
+ readonly required: 1;
339
+ readonly total: 1;
340
+ readonly variadic: false;
341
+ };
342
+ }, {
343
+ readonly name: "bitAnd";
344
+ readonly kind: "function";
345
+ readonly contract: {
346
+ readonly required: 2;
347
+ readonly total: 2;
348
+ readonly variadic: false;
349
+ };
350
+ }, {
351
+ readonly name: "bitOr";
352
+ readonly kind: "function";
353
+ readonly contract: {
354
+ readonly required: 2;
355
+ readonly total: 2;
356
+ readonly variadic: false;
357
+ };
358
+ }, {
359
+ readonly name: "bitXor";
360
+ readonly kind: "function";
361
+ readonly contract: {
362
+ readonly required: 2;
363
+ readonly total: 2;
364
+ readonly variadic: false;
365
+ };
366
+ }, {
367
+ readonly name: "bitNot";
368
+ readonly kind: "function";
369
+ readonly contract: {
370
+ readonly required: 2;
371
+ readonly total: 2;
372
+ readonly variadic: false;
373
+ };
374
+ }, {
375
+ readonly name: "bitShiftLeft";
376
+ readonly kind: "function";
377
+ readonly contract: {
378
+ readonly required: 2;
379
+ readonly total: 3;
380
+ readonly variadic: false;
381
+ };
382
+ }, {
383
+ readonly name: "bitShiftRight";
384
+ readonly kind: "function";
385
+ readonly contract: {
386
+ readonly required: 2;
387
+ readonly total: 2;
388
+ readonly variadic: false;
389
+ };
390
+ }, {
391
+ readonly name: "bitRotateLeft";
392
+ readonly kind: "function";
393
+ readonly contract: {
394
+ readonly required: 3;
395
+ readonly total: 3;
396
+ readonly variadic: false;
397
+ };
398
+ }, {
399
+ readonly name: "bitRotateRight";
400
+ readonly kind: "function";
401
+ readonly contract: {
402
+ readonly required: 3;
403
+ readonly total: 3;
404
+ readonly variadic: false;
405
+ };
406
+ }, {
407
+ readonly name: "bitCount";
408
+ readonly kind: "function";
409
+ readonly contract: {
410
+ readonly required: 1;
411
+ readonly total: 1;
412
+ readonly variadic: false;
413
+ };
414
+ }, {
415
+ readonly name: "bitTest";
416
+ readonly kind: "function";
417
+ readonly contract: {
418
+ readonly required: 2;
419
+ readonly total: 2;
420
+ readonly variadic: false;
421
+ };
422
+ }, {
423
+ readonly name: "fromFloat64";
424
+ readonly kind: "function";
425
+ readonly contract: {
426
+ readonly required: 1;
427
+ readonly total: 2;
428
+ readonly variadic: false;
429
+ };
430
+ }, {
431
+ readonly name: "fromFloat32";
432
+ readonly kind: "function";
433
+ readonly contract: {
434
+ readonly required: 1;
435
+ readonly total: 2;
436
+ readonly variadic: false;
437
+ };
438
+ }, {
439
+ readonly name: "toFloat64";
440
+ readonly kind: "function";
441
+ readonly contract: {
442
+ readonly required: 1;
443
+ readonly total: 2;
444
+ readonly variadic: false;
445
+ };
446
+ }, {
447
+ readonly name: "toFloat32";
448
+ readonly kind: "function";
449
+ readonly contract: {
450
+ readonly required: 1;
451
+ readonly total: 2;
452
+ readonly variadic: false;
453
+ };
454
+ }, {
455
+ readonly name: "year";
456
+ readonly kind: "function";
457
+ readonly contract: {
458
+ readonly required: 1;
459
+ readonly total: 1;
460
+ readonly variadic: false;
461
+ };
462
+ }, {
463
+ readonly name: "month";
464
+ readonly kind: "function";
465
+ readonly contract: {
466
+ readonly required: 1;
467
+ readonly total: 1;
468
+ readonly variadic: false;
469
+ };
470
+ }, {
471
+ readonly name: "day";
472
+ readonly kind: "function";
473
+ readonly contract: {
474
+ readonly required: 1;
475
+ readonly total: 1;
476
+ readonly variadic: false;
477
+ };
478
+ }, {
479
+ readonly name: "hour";
480
+ readonly kind: "function";
481
+ readonly contract: {
482
+ readonly required: 1;
483
+ readonly total: 1;
484
+ readonly variadic: false;
485
+ };
486
+ }, {
487
+ readonly name: "minute";
488
+ readonly kind: "function";
489
+ readonly contract: {
490
+ readonly required: 1;
491
+ readonly total: 1;
492
+ readonly variadic: false;
493
+ };
494
+ }, {
495
+ readonly name: "second";
496
+ readonly kind: "function";
497
+ readonly contract: {
498
+ readonly required: 1;
499
+ readonly total: 1;
500
+ readonly variadic: false;
501
+ };
502
+ }, {
503
+ readonly name: "microsecond";
504
+ readonly kind: "function";
505
+ readonly contract: {
506
+ readonly required: 1;
507
+ readonly total: 1;
508
+ readonly variadic: false;
509
+ };
510
+ }, {
511
+ readonly name: "weekday";
512
+ readonly kind: "function";
513
+ readonly contract: {
514
+ readonly required: 1;
515
+ readonly total: 1;
516
+ readonly variadic: false;
517
+ };
518
+ }, {
519
+ readonly name: "dayOfYear";
520
+ readonly kind: "function";
521
+ readonly contract: {
522
+ readonly required: 1;
523
+ readonly total: 1;
524
+ readonly variadic: false;
525
+ };
526
+ }, {
527
+ readonly name: "isoWeek";
528
+ readonly kind: "function";
529
+ readonly contract: {
530
+ readonly required: 1;
531
+ readonly total: 1;
532
+ readonly variadic: false;
533
+ };
534
+ }, {
535
+ readonly name: "isoWeekYear";
536
+ readonly kind: "function";
537
+ readonly contract: {
538
+ readonly required: 1;
539
+ readonly total: 1;
540
+ readonly variadic: false;
541
+ };
542
+ }, {
543
+ readonly name: "hasTime";
544
+ readonly kind: "function";
545
+ readonly contract: {
546
+ readonly required: 1;
547
+ readonly total: 1;
548
+ readonly variadic: false;
549
+ };
550
+ }, {
551
+ readonly name: "toCivil";
552
+ readonly kind: "function";
553
+ readonly contract: {
554
+ readonly required: 2;
555
+ readonly total: 2;
556
+ readonly variadic: false;
557
+ };
558
+ }, {
559
+ readonly name: "toInstant";
560
+ readonly kind: "function";
561
+ readonly contract: {
562
+ readonly required: 2;
563
+ readonly total: 2;
564
+ readonly variadic: false;
565
+ };
566
+ }, {
567
+ readonly name: "pi";
568
+ readonly kind: "constant";
569
+ }, {
570
+ readonly name: "newline";
571
+ readonly kind: "constant";
572
+ }, {
573
+ readonly name: "tab";
574
+ readonly kind: "constant";
575
+ }, {
576
+ readonly name: "quote";
577
+ readonly kind: "constant";
578
+ }, {
579
+ readonly name: "offerAvailable";
580
+ readonly kind: "function";
581
+ readonly contract: {
582
+ readonly required: 1;
583
+ readonly total: 1;
584
+ readonly variadic: false;
585
+ };
586
+ }];
587
+ //#endregion
588
+ //#region src/parser.d.ts
589
+ declare class ParseError extends Error {
590
+ readonly tok: Token;
591
+ readonly code: SyntaxErrorCode;
592
+ /** A complete Session Entry was followed by additional input. */
593
+ trailingEntry: boolean;
594
+ constructor(tok: Token, code: SyntaxErrorCode, msg: string);
595
+ }
596
+ /** Only the first diagnostic is normative; later ones describe recovery. */
597
+ type RecoveryDiagnostic = {
598
+ error: ParseError;
599
+ recovery: boolean;
600
+ };
601
+ /** What an Entry is, decided on its first token (chapter 2, Entries). */
602
+ type EntryKind = 'declaration' | 'statement' | 'expression';
603
+ type ParseResult = {
604
+ error: null;
605
+ tree: SyntaxNode;
606
+ } | {
607
+ error: ParseError;
608
+ tree: null;
609
+ };
610
+ /** Public parsing retains every production and token. */
611
+ declare const parseSource: (source: string) => ParseResult;
612
+ /** A lossless tooling parse, including malformed regions as Error nodes. */
613
+ type RecoveringParseResult = {
614
+ diagnostics: readonly RecoveryDiagnostic[];
615
+ error: ParseError | null;
616
+ tree: SyntaxNode;
617
+ };
618
+ /** Recover past syntax errors. Invalid scalar source still throws HostError. */
619
+ declare const parseSourceRecovering: (source: string) => RecoveringParseResult;
620
+ type EntryResult = {
621
+ error: null;
622
+ kind: EntryKind | null;
623
+ tree: SyntaxNode;
624
+ } | {
625
+ error: ParseError;
626
+ /** The source ended before the Entry did, so more lines may finish it. */
627
+ incomplete: boolean;
628
+ tree: null;
629
+ };
630
+ /**
631
+ * Parse an Entry at a Session prompt (chapter 2, Entries). Its kind is null
632
+ * when it holds only blank lines and comments. Invalid scalar source throws
633
+ * HostError.
634
+ */
635
+ declare const parseEntry: (source: string, isHandler: (name: string) => boolean) => EntryResult;
636
+ //#endregion
637
+ //#region src/checker.d.ts
638
+ type DiagnosticCode = (typeof diagnosticCodes)[number];
639
+ type Diagnostic = {
640
+ code: DiagnosticCode;
641
+ message: string;
642
+ span: SourceSpan;
643
+ };
644
+ type ExistingName = Pick<Binding, 'kind' | 'contract' | 'importedFrom'> & {
645
+ handler?: ExistingName;
646
+ maySuspend?: boolean;
647
+ };
648
+ type CheckOptions = {
649
+ /** Names in older code units when checking a Script extension. */
650
+ existing?: Readonly<Record<string, ExistingName>>;
651
+ /** A Script's Grants, to check its Capability calls against; none checks none. */
652
+ grants?: GrantDecls;
653
+ /** Exports supplied by the Library loader; kind-only entries defer call-count checks. */
654
+ libraries?: Readonly<Record<string, Readonly<Record<string, LibraryExport>>>>;
655
+ /** Literal property names mapped to setter availability, by bound Object name. */
656
+ objectProperties?: Readonly<Record<string, Readonly<Record<string, boolean>>>>;
657
+ /** Well-known Host Object names bound at load. */
658
+ objects?: readonly string[];
659
+ /** Setter availability for an Owning Script's me. */
660
+ ownerProperties?: Readonly<Record<string, boolean>>;
661
+ /** The stdlib Libraries a `use` may name; absent means all seven. */
662
+ stdlib?: ReadonlySet<string>;
663
+ /** Whether the source is a Script (the default) or a Library. */
664
+ unit?: 'script' | 'library';
665
+ };
666
+ type SemanticResult = {
667
+ diagnostics: readonly Diagnostic[];
668
+ ok: boolean;
669
+ tree: SemanticTree;
670
+ };
671
+ type CheckResult = (SemanticResult & {
672
+ error: null;
673
+ }) | {
674
+ diagnostics: readonly Diagnostic[];
675
+ error: ParseError;
676
+ ok: false;
677
+ tree: null;
678
+ };
679
+ /**
680
+ * Resolve bindings and check writes, named calls, constants and control flow.
681
+ * On recovered syntax, omit malformed constructs and check retained code.
682
+ */
683
+ declare const checkSyntax: (syntax: SyntaxNode, options?: CheckOptions) => SemanticResult;
684
+ declare const checkSource: (source: string, options?: CheckOptions) => CheckResult;
685
+ //#endregion
686
+ //#region src/constructs.d.ts
687
+ /** Chapter 3's kind names. */
688
+ declare const kindNames: ReadonlySet<string>;
689
+ //#endregion
690
+ //#region src/create-group.d.ts
691
+ /** Omitting core uses the process-wide TS Core. */
692
+ type CreateGroupOptions = DrivenGroupOptions & {
693
+ core?: Core;
694
+ };
695
+ /** Creates a driven Group that supports `await using` and explicit close(reason). */
696
+ declare const createGroup: (o: CreateGroupOptions) => DrivenGroup;
697
+ //#endregion
698
+ //#region src/lowering.d.ts
699
+ /** A construct whose lowering the Spec leaves unsettled; not a load diagnostic. */
700
+ declare class LoweringError extends Error {
701
+ readonly line: number;
702
+ readonly col: number;
703
+ constructor(line: number, col: number, message: string);
704
+ }
705
+ type CompileOptions = CheckOptions & {
706
+ /** The Script's or Library's name, which the disassembly's `unit` line shows. */
707
+ name: string;
708
+ };
709
+ type CompileResult = {
710
+ diagnostics: readonly Diagnostic[];
711
+ error: null;
712
+ unit: CodeUnit;
713
+ } | {
714
+ diagnostics: readonly Diagnostic[];
715
+ error: ParseError | null;
716
+ unit: null;
717
+ };
718
+ /** A checked Library's exports, for the Scripts and Libraries that import it. */
719
+ declare const exportsOf: (tree: SemanticTree) => Record<string, Exclude<LibraryExport, string>>;
720
+ /** Lower a checked semantic tree into its code unit. */
721
+ declare const lowerTree: (tree: SemanticTree, options: Pick<CompileOptions, "name" | "unit"> & {
722
+ existingVariables?: readonly string[];
723
+ }) => CodeUnit;
724
+ /**
725
+ * Parse, check and lower a Script or Library. The first syntax error, or any
726
+ * load diagnostic the checker reports, leaves no code unit.
727
+ */
728
+ declare const compileSource: (source: string, options: CompileOptions) => CompileResult;
729
+ //#endregion
730
+ //#region src/documentation.d.ts
731
+ /**
732
+ * The source start of a top-level declaration including its attached marked
733
+ * comments. Tooling that submits it as an Entry keeps the exact block, even
734
+ * before an Import (which the Session Host refuses at the prompt).
735
+ */
736
+ declare const declarationStart: (root: SyntaxNode, declaration: SyntaxNode) => number;
737
+ //#endregion
738
+ //#region src/selectors.d.ts
739
+ declare const validMessageSelector: (message: string, arity: number) => boolean;
740
+ //#endregion
741
+ export { units as A, RecoveringParseResult as C, parseSourceRecovering as D, parseSource as E, builtins as O, ParseResult as S, parseEntry as T, checkSource as _, LoweringError as a, EntryResult as b, lowerTree as c, kindNames as d, CheckOptions as f, SemanticResult as g, DiagnosticCode as h, CompileResult as i, grammar as k, CreateGroupOptions as l, Diagnostic as m, declarationStart as n, compileSource as o, CheckResult as p, CompileOptions as r, exportsOf as s, validMessageSelector as t, createGroup as u, checkSyntax as v, RecoveryDiagnostic as w, ParseError as x, EntryKind as y };