@northtalk/ts 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -14
- package/{base64-DORMd3Hv.js → base64-Dtqaz_0A.js} +880 -409
- package/{binary-value-CEmh60GC.d.ts → binary-value-Bb6HPDtM.d.ts} +2 -2
- package/{capabilities-CH0FkRMq.js → capabilities-Bi5Qm6Fr.js} +39 -20
- package/{checker-Dc1jl2WH.js → checker-DMI4LiRm.js} +321 -112
- package/core-BzGUgjL6.d.ts +22 -0
- package/{debug-CQBxKnJB.d.ts → debug-C72o2pZy.d.ts} +506 -50
- package/debug.d.ts +3 -3
- package/debug.js +1 -1
- package/driver-ClV_UDEK.d.ts +63 -0
- package/driver.d.ts +2 -40
- package/driver.js +24 -4
- package/{encoding-nlrpj-Pb.js → encoding-C3Q7pIC9.js} +2 -2
- package/{engine-BGaJ9dAk.js → engine-BpdGfAND.js} +6 -6
- package/{engine-vbYInVYF.d.ts → engine-Dtby_FkE.d.ts} +3 -3
- package/{errors-LYJZ_c8h.js → errors-BKJES3Zu.js} +1060 -751
- package/{group-B742gg4T.js → group-vuUL2tq-.js} +6526 -1725
- package/http.d.ts +2 -2
- package/http.js +3 -3
- package/index-ByF5j53i.d.ts +779 -0
- package/index.d.ts +6 -651
- package/index.js +23 -15
- package/{http-capability-CSTkw1Yt.js → inline-grants-Cx0Z9XAt.js} +109 -24
- package/manifest-Dw-8Unmf.js +256 -0
- package/message-layer.d.ts +3 -3
- package/message-layer.js +2 -2
- package/notify.d.ts +2 -2
- package/notify.js +1 -1
- package/{objects-Db7IB5vQ.js → objects-BC4fS0vq.js} +1 -1
- package/{objects-DJ3QtCCs.d.ts → objects-Dnqor7Gn.d.ts} +12 -4
- package/{operation-promises-EgZXG5N_.js → operation-promises-ClA1BTaS.js} +10 -5
- package/package.json +2 -2
- package/{readers-CjJHKHvH.js → readers-B5e5bBrY.js} +2 -2
- package/{readers-BFPuosPk.d.ts → readers-DAFVvvq4.d.ts} +2 -2
- package/{request-pump-binary-DdY3X-yl.js → request-pump-binary-BjnyqXV5.js} +4 -4
- package/{router--71qvxtY.js → router-BCHEfs4x.js} +5 -5
- package/{router-Zhrw5l__.d.ts → router-BspOCPA0.d.ts} +3 -3
- package/session.d.ts +41 -3
- package/session.js +260 -179
- package/setup.d.ts +2 -2
- package/setup.js +4 -4
- package/sha256-9CGf5BS_.js +168 -0
- package/sqlite.d.ts +5 -5
- package/sqlite.js +27 -21
- package/{store-hJrRULMx.js → store-DTQa0lyE.js} +2 -2
- package/{store-capability-OZp4hXmj.js → store-capability-BxXgiRM7.js} +4 -4
- package/store.d.ts +3 -3
- package/store.js +2 -2
- package/{user-capability-BK4Asg7D.js → user-capability-5-IvCeZI.js} +5 -5
- package/wasm.d.ts +12 -8
- package/wasm.js +67 -39
- package/core-DptnvQT9.d.ts +0 -14
- package/manifest-BscyH_rW.d.ts +0 -70
- package/manifest-DjsxDSuB.js +0 -129
- package/sha256-B_kyYw3Z.js +0 -124
|
@@ -0,0 +1,779 @@
|
|
|
1
|
+
/// <reference lib="esnext.disposable" />
|
|
2
|
+
import { $t as Script, Dr as SyntaxNode, Er as SyntaxErrorCode, J as Value, K as Decimal, Qt as Group, Tn as Library, Zt as Core, _ as LoadOptions, br as SourceSpan, cr as Binding, fr as LibraryExport, ht as ObjectKind, jt as Grant, qt as Shape, tr as CodeUnit, wr as Token, yr as SemanticTree, yt as GrantDecls } from "./debug-C72o2pZy.js";
|
|
3
|
+
import { n as Drive, r as DrivenGroupOptions } from "./driver-ClV_UDEK.js";
|
|
4
|
+
//#region src/generated/syntax.d.ts
|
|
5
|
+
declare const grammar: {
|
|
6
|
+
reserved: string[];
|
|
7
|
+
labels: {
|
|
8
|
+
reserved: string[];
|
|
9
|
+
excluded: string[];
|
|
10
|
+
};
|
|
11
|
+
chunk: {
|
|
12
|
+
singular: string;
|
|
13
|
+
plural: string;
|
|
14
|
+
}[];
|
|
15
|
+
ordinals: string[];
|
|
16
|
+
properties: string[];
|
|
17
|
+
follow: string[];
|
|
18
|
+
decision: string[];
|
|
19
|
+
text_patterns: {
|
|
20
|
+
keywords: string[];
|
|
21
|
+
classes: string[];
|
|
22
|
+
anchors: string[];
|
|
23
|
+
phrases: string[];
|
|
24
|
+
};
|
|
25
|
+
binary_patterns: {
|
|
26
|
+
integer_types: string[];
|
|
27
|
+
size_units: string[];
|
|
28
|
+
byte_orders: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
declare const units: ({
|
|
32
|
+
name: string;
|
|
33
|
+
kind: string;
|
|
34
|
+
calendar: boolean;
|
|
35
|
+
factor: string[];
|
|
36
|
+
plural?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
name: string;
|
|
39
|
+
plural: string;
|
|
40
|
+
kind: string;
|
|
41
|
+
calendar: boolean;
|
|
42
|
+
factor: string[];
|
|
43
|
+
})[];
|
|
44
|
+
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"];
|
|
45
|
+
declare const builtins: readonly [{
|
|
46
|
+
readonly name: "min";
|
|
47
|
+
readonly kind: "function";
|
|
48
|
+
readonly contract: {
|
|
49
|
+
readonly required: 1;
|
|
50
|
+
readonly total: 1;
|
|
51
|
+
readonly variadic: true;
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "max";
|
|
55
|
+
readonly kind: "function";
|
|
56
|
+
readonly contract: {
|
|
57
|
+
readonly required: 1;
|
|
58
|
+
readonly total: 1;
|
|
59
|
+
readonly variadic: true;
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "codePoint";
|
|
63
|
+
readonly kind: "function";
|
|
64
|
+
readonly contract: {
|
|
65
|
+
readonly required: 1;
|
|
66
|
+
readonly total: 1;
|
|
67
|
+
readonly variadic: false;
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "fromCodePoint";
|
|
71
|
+
readonly kind: "function";
|
|
72
|
+
readonly contract: {
|
|
73
|
+
readonly required: 1;
|
|
74
|
+
readonly total: 1;
|
|
75
|
+
readonly variadic: false;
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "upper";
|
|
79
|
+
readonly kind: "function";
|
|
80
|
+
readonly contract: {
|
|
81
|
+
readonly required: 1;
|
|
82
|
+
readonly total: 1;
|
|
83
|
+
readonly variadic: false;
|
|
84
|
+
};
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "lower";
|
|
87
|
+
readonly kind: "function";
|
|
88
|
+
readonly contract: {
|
|
89
|
+
readonly required: 1;
|
|
90
|
+
readonly total: 1;
|
|
91
|
+
readonly variadic: false;
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "offset";
|
|
95
|
+
readonly kind: "function";
|
|
96
|
+
readonly contract: {
|
|
97
|
+
readonly required: 2;
|
|
98
|
+
readonly total: 2;
|
|
99
|
+
readonly variadic: false;
|
|
100
|
+
};
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "isDisposed";
|
|
103
|
+
readonly kind: "function";
|
|
104
|
+
readonly contract: {
|
|
105
|
+
readonly required: 1;
|
|
106
|
+
readonly total: 1;
|
|
107
|
+
readonly variadic: false;
|
|
108
|
+
};
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "objectKind";
|
|
111
|
+
readonly kind: "function";
|
|
112
|
+
readonly contract: {
|
|
113
|
+
readonly required: 1;
|
|
114
|
+
readonly total: 1;
|
|
115
|
+
readonly variadic: false;
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "rangeStart";
|
|
119
|
+
readonly kind: "function";
|
|
120
|
+
readonly contract: {
|
|
121
|
+
readonly required: 1;
|
|
122
|
+
readonly total: 1;
|
|
123
|
+
readonly variadic: false;
|
|
124
|
+
};
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "rangeEnd";
|
|
127
|
+
readonly kind: "function";
|
|
128
|
+
readonly contract: {
|
|
129
|
+
readonly required: 1;
|
|
130
|
+
readonly total: 1;
|
|
131
|
+
readonly variadic: false;
|
|
132
|
+
};
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "kindOf";
|
|
135
|
+
readonly kind: "function";
|
|
136
|
+
readonly contract: {
|
|
137
|
+
readonly required: 1;
|
|
138
|
+
readonly total: 1;
|
|
139
|
+
readonly variadic: false;
|
|
140
|
+
};
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "conforms";
|
|
143
|
+
readonly kind: "function";
|
|
144
|
+
readonly contract: {
|
|
145
|
+
readonly required: 2;
|
|
146
|
+
readonly total: 2;
|
|
147
|
+
readonly variadic: false;
|
|
148
|
+
};
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "check";
|
|
151
|
+
readonly kind: "function";
|
|
152
|
+
readonly contract: {
|
|
153
|
+
readonly required: 2;
|
|
154
|
+
readonly total: 2;
|
|
155
|
+
readonly variadic: false;
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "explain";
|
|
159
|
+
readonly kind: "function";
|
|
160
|
+
readonly contract: {
|
|
161
|
+
readonly required: 2;
|
|
162
|
+
readonly total: 2;
|
|
163
|
+
readonly variadic: false;
|
|
164
|
+
};
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "functionArity";
|
|
167
|
+
readonly kind: "function";
|
|
168
|
+
readonly contract: {
|
|
169
|
+
readonly required: 1;
|
|
170
|
+
readonly total: 1;
|
|
171
|
+
readonly variadic: false;
|
|
172
|
+
};
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "functionName";
|
|
175
|
+
readonly kind: "function";
|
|
176
|
+
readonly contract: {
|
|
177
|
+
readonly required: 1;
|
|
178
|
+
readonly total: 1;
|
|
179
|
+
readonly variadic: false;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "abs";
|
|
183
|
+
readonly kind: "function";
|
|
184
|
+
readonly contract: {
|
|
185
|
+
readonly required: 1;
|
|
186
|
+
readonly total: 1;
|
|
187
|
+
readonly variadic: false;
|
|
188
|
+
};
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "floor";
|
|
191
|
+
readonly kind: "function";
|
|
192
|
+
readonly contract: {
|
|
193
|
+
readonly required: 1;
|
|
194
|
+
readonly total: 1;
|
|
195
|
+
readonly variadic: false;
|
|
196
|
+
};
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "ceiling";
|
|
199
|
+
readonly kind: "function";
|
|
200
|
+
readonly contract: {
|
|
201
|
+
readonly required: 1;
|
|
202
|
+
readonly total: 1;
|
|
203
|
+
readonly variadic: false;
|
|
204
|
+
};
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "truncate";
|
|
207
|
+
readonly kind: "function";
|
|
208
|
+
readonly contract: {
|
|
209
|
+
readonly required: 1;
|
|
210
|
+
readonly total: 1;
|
|
211
|
+
readonly variadic: false;
|
|
212
|
+
};
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "round";
|
|
215
|
+
readonly kind: "function";
|
|
216
|
+
readonly contract: {
|
|
217
|
+
readonly required: 1;
|
|
218
|
+
readonly total: 3;
|
|
219
|
+
readonly variadic: false;
|
|
220
|
+
};
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "sqrt";
|
|
223
|
+
readonly kind: "function";
|
|
224
|
+
readonly contract: {
|
|
225
|
+
readonly required: 1;
|
|
226
|
+
readonly total: 1;
|
|
227
|
+
readonly variadic: false;
|
|
228
|
+
};
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "exp";
|
|
231
|
+
readonly kind: "function";
|
|
232
|
+
readonly contract: {
|
|
233
|
+
readonly required: 1;
|
|
234
|
+
readonly total: 1;
|
|
235
|
+
readonly variadic: false;
|
|
236
|
+
};
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "ln";
|
|
239
|
+
readonly kind: "function";
|
|
240
|
+
readonly contract: {
|
|
241
|
+
readonly required: 1;
|
|
242
|
+
readonly total: 1;
|
|
243
|
+
readonly variadic: false;
|
|
244
|
+
};
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "log10";
|
|
247
|
+
readonly kind: "function";
|
|
248
|
+
readonly contract: {
|
|
249
|
+
readonly required: 1;
|
|
250
|
+
readonly total: 1;
|
|
251
|
+
readonly variadic: false;
|
|
252
|
+
};
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "power";
|
|
255
|
+
readonly kind: "function";
|
|
256
|
+
readonly contract: {
|
|
257
|
+
readonly required: 2;
|
|
258
|
+
readonly total: 2;
|
|
259
|
+
readonly variadic: false;
|
|
260
|
+
};
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "sin";
|
|
263
|
+
readonly kind: "function";
|
|
264
|
+
readonly contract: {
|
|
265
|
+
readonly required: 1;
|
|
266
|
+
readonly total: 1;
|
|
267
|
+
readonly variadic: false;
|
|
268
|
+
};
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "cos";
|
|
271
|
+
readonly kind: "function";
|
|
272
|
+
readonly contract: {
|
|
273
|
+
readonly required: 1;
|
|
274
|
+
readonly total: 1;
|
|
275
|
+
readonly variadic: false;
|
|
276
|
+
};
|
|
277
|
+
}, {
|
|
278
|
+
readonly name: "tan";
|
|
279
|
+
readonly kind: "function";
|
|
280
|
+
readonly contract: {
|
|
281
|
+
readonly required: 1;
|
|
282
|
+
readonly total: 1;
|
|
283
|
+
readonly variadic: false;
|
|
284
|
+
};
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "asin";
|
|
287
|
+
readonly kind: "function";
|
|
288
|
+
readonly contract: {
|
|
289
|
+
readonly required: 1;
|
|
290
|
+
readonly total: 1;
|
|
291
|
+
readonly variadic: false;
|
|
292
|
+
};
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "acos";
|
|
295
|
+
readonly kind: "function";
|
|
296
|
+
readonly contract: {
|
|
297
|
+
readonly required: 1;
|
|
298
|
+
readonly total: 1;
|
|
299
|
+
readonly variadic: false;
|
|
300
|
+
};
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "atan";
|
|
303
|
+
readonly kind: "function";
|
|
304
|
+
readonly contract: {
|
|
305
|
+
readonly required: 1;
|
|
306
|
+
readonly total: 1;
|
|
307
|
+
readonly variadic: false;
|
|
308
|
+
};
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "atan2";
|
|
311
|
+
readonly kind: "function";
|
|
312
|
+
readonly contract: {
|
|
313
|
+
readonly required: 2;
|
|
314
|
+
readonly total: 2;
|
|
315
|
+
readonly variadic: false;
|
|
316
|
+
};
|
|
317
|
+
}, {
|
|
318
|
+
readonly name: "degrees";
|
|
319
|
+
readonly kind: "function";
|
|
320
|
+
readonly contract: {
|
|
321
|
+
readonly required: 1;
|
|
322
|
+
readonly total: 1;
|
|
323
|
+
readonly variadic: false;
|
|
324
|
+
};
|
|
325
|
+
}, {
|
|
326
|
+
readonly name: "radians";
|
|
327
|
+
readonly kind: "function";
|
|
328
|
+
readonly contract: {
|
|
329
|
+
readonly required: 1;
|
|
330
|
+
readonly total: 1;
|
|
331
|
+
readonly variadic: false;
|
|
332
|
+
};
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "random";
|
|
335
|
+
readonly kind: "function";
|
|
336
|
+
readonly contract: {
|
|
337
|
+
readonly required: 1;
|
|
338
|
+
readonly total: 1;
|
|
339
|
+
readonly variadic: false;
|
|
340
|
+
};
|
|
341
|
+
}, {
|
|
342
|
+
readonly name: "fromFloat64";
|
|
343
|
+
readonly kind: "function";
|
|
344
|
+
readonly contract: {
|
|
345
|
+
readonly required: 1;
|
|
346
|
+
readonly total: 2;
|
|
347
|
+
readonly variadic: false;
|
|
348
|
+
};
|
|
349
|
+
}, {
|
|
350
|
+
readonly name: "fromFloat32";
|
|
351
|
+
readonly kind: "function";
|
|
352
|
+
readonly contract: {
|
|
353
|
+
readonly required: 1;
|
|
354
|
+
readonly total: 2;
|
|
355
|
+
readonly variadic: false;
|
|
356
|
+
};
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "toFloat64";
|
|
359
|
+
readonly kind: "function";
|
|
360
|
+
readonly contract: {
|
|
361
|
+
readonly required: 1;
|
|
362
|
+
readonly total: 2;
|
|
363
|
+
readonly variadic: false;
|
|
364
|
+
};
|
|
365
|
+
}, {
|
|
366
|
+
readonly name: "toFloat32";
|
|
367
|
+
readonly kind: "function";
|
|
368
|
+
readonly contract: {
|
|
369
|
+
readonly required: 1;
|
|
370
|
+
readonly total: 2;
|
|
371
|
+
readonly variadic: false;
|
|
372
|
+
};
|
|
373
|
+
}, {
|
|
374
|
+
readonly name: "year";
|
|
375
|
+
readonly kind: "function";
|
|
376
|
+
readonly contract: {
|
|
377
|
+
readonly required: 1;
|
|
378
|
+
readonly total: 1;
|
|
379
|
+
readonly variadic: false;
|
|
380
|
+
};
|
|
381
|
+
}, {
|
|
382
|
+
readonly name: "month";
|
|
383
|
+
readonly kind: "function";
|
|
384
|
+
readonly contract: {
|
|
385
|
+
readonly required: 1;
|
|
386
|
+
readonly total: 1;
|
|
387
|
+
readonly variadic: false;
|
|
388
|
+
};
|
|
389
|
+
}, {
|
|
390
|
+
readonly name: "day";
|
|
391
|
+
readonly kind: "function";
|
|
392
|
+
readonly contract: {
|
|
393
|
+
readonly required: 1;
|
|
394
|
+
readonly total: 1;
|
|
395
|
+
readonly variadic: false;
|
|
396
|
+
};
|
|
397
|
+
}, {
|
|
398
|
+
readonly name: "hour";
|
|
399
|
+
readonly kind: "function";
|
|
400
|
+
readonly contract: {
|
|
401
|
+
readonly required: 1;
|
|
402
|
+
readonly total: 1;
|
|
403
|
+
readonly variadic: false;
|
|
404
|
+
};
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "minute";
|
|
407
|
+
readonly kind: "function";
|
|
408
|
+
readonly contract: {
|
|
409
|
+
readonly required: 1;
|
|
410
|
+
readonly total: 1;
|
|
411
|
+
readonly variadic: false;
|
|
412
|
+
};
|
|
413
|
+
}, {
|
|
414
|
+
readonly name: "second";
|
|
415
|
+
readonly kind: "function";
|
|
416
|
+
readonly contract: {
|
|
417
|
+
readonly required: 1;
|
|
418
|
+
readonly total: 1;
|
|
419
|
+
readonly variadic: false;
|
|
420
|
+
};
|
|
421
|
+
}, {
|
|
422
|
+
readonly name: "microsecond";
|
|
423
|
+
readonly kind: "function";
|
|
424
|
+
readonly contract: {
|
|
425
|
+
readonly required: 1;
|
|
426
|
+
readonly total: 1;
|
|
427
|
+
readonly variadic: false;
|
|
428
|
+
};
|
|
429
|
+
}, {
|
|
430
|
+
readonly name: "weekday";
|
|
431
|
+
readonly kind: "function";
|
|
432
|
+
readonly contract: {
|
|
433
|
+
readonly required: 1;
|
|
434
|
+
readonly total: 1;
|
|
435
|
+
readonly variadic: false;
|
|
436
|
+
};
|
|
437
|
+
}, {
|
|
438
|
+
readonly name: "dayOfYear";
|
|
439
|
+
readonly kind: "function";
|
|
440
|
+
readonly contract: {
|
|
441
|
+
readonly required: 1;
|
|
442
|
+
readonly total: 1;
|
|
443
|
+
readonly variadic: false;
|
|
444
|
+
};
|
|
445
|
+
}, {
|
|
446
|
+
readonly name: "isoWeek";
|
|
447
|
+
readonly kind: "function";
|
|
448
|
+
readonly contract: {
|
|
449
|
+
readonly required: 1;
|
|
450
|
+
readonly total: 1;
|
|
451
|
+
readonly variadic: false;
|
|
452
|
+
};
|
|
453
|
+
}, {
|
|
454
|
+
readonly name: "isoWeekYear";
|
|
455
|
+
readonly kind: "function";
|
|
456
|
+
readonly contract: {
|
|
457
|
+
readonly required: 1;
|
|
458
|
+
readonly total: 1;
|
|
459
|
+
readonly variadic: false;
|
|
460
|
+
};
|
|
461
|
+
}, {
|
|
462
|
+
readonly name: "hasTime";
|
|
463
|
+
readonly kind: "function";
|
|
464
|
+
readonly contract: {
|
|
465
|
+
readonly required: 1;
|
|
466
|
+
readonly total: 1;
|
|
467
|
+
readonly variadic: false;
|
|
468
|
+
};
|
|
469
|
+
}, {
|
|
470
|
+
readonly name: "toCivil";
|
|
471
|
+
readonly kind: "function";
|
|
472
|
+
readonly contract: {
|
|
473
|
+
readonly required: 2;
|
|
474
|
+
readonly total: 2;
|
|
475
|
+
readonly variadic: false;
|
|
476
|
+
};
|
|
477
|
+
}, {
|
|
478
|
+
readonly name: "toInstant";
|
|
479
|
+
readonly kind: "function";
|
|
480
|
+
readonly contract: {
|
|
481
|
+
readonly required: 2;
|
|
482
|
+
readonly total: 2;
|
|
483
|
+
readonly variadic: false;
|
|
484
|
+
};
|
|
485
|
+
}, {
|
|
486
|
+
readonly name: "pi";
|
|
487
|
+
readonly kind: "constant";
|
|
488
|
+
}, {
|
|
489
|
+
readonly name: "newline";
|
|
490
|
+
readonly kind: "constant";
|
|
491
|
+
}, {
|
|
492
|
+
readonly name: "tab";
|
|
493
|
+
readonly kind: "constant";
|
|
494
|
+
}, {
|
|
495
|
+
readonly name: "quote";
|
|
496
|
+
readonly kind: "constant";
|
|
497
|
+
}, {
|
|
498
|
+
readonly name: "offerAvailable";
|
|
499
|
+
readonly kind: "function";
|
|
500
|
+
readonly contract: {
|
|
501
|
+
readonly required: 1;
|
|
502
|
+
readonly total: 1;
|
|
503
|
+
readonly variadic: false;
|
|
504
|
+
};
|
|
505
|
+
}];
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region src/parser.d.ts
|
|
508
|
+
declare class ParseError extends Error {
|
|
509
|
+
readonly tok: Token;
|
|
510
|
+
readonly code: SyntaxErrorCode;
|
|
511
|
+
/** A complete Session Entry was followed by additional input. */
|
|
512
|
+
trailingEntry: boolean;
|
|
513
|
+
constructor(tok: Token, code: SyntaxErrorCode, msg: string);
|
|
514
|
+
}
|
|
515
|
+
/** Only the first diagnostic is normative; later ones describe recovery. */
|
|
516
|
+
type RecoveryDiagnostic = {
|
|
517
|
+
error: ParseError;
|
|
518
|
+
recovery: boolean;
|
|
519
|
+
};
|
|
520
|
+
/** What an Entry is, decided on its first token (chapter 2, Entries). */
|
|
521
|
+
type EntryKind = 'declaration' | 'statement' | 'expression';
|
|
522
|
+
type ParseResult = {
|
|
523
|
+
error: null;
|
|
524
|
+
tree: SyntaxNode;
|
|
525
|
+
} | {
|
|
526
|
+
error: ParseError;
|
|
527
|
+
tree: null;
|
|
528
|
+
};
|
|
529
|
+
/** Public parsing retains every production and token. */
|
|
530
|
+
declare const parseSource: (source: string) => ParseResult;
|
|
531
|
+
/** A lossless tooling parse, including malformed regions as Error nodes. */
|
|
532
|
+
type RecoveringParseResult = {
|
|
533
|
+
diagnostics: readonly RecoveryDiagnostic[];
|
|
534
|
+
error: ParseError | null;
|
|
535
|
+
tree: SyntaxNode;
|
|
536
|
+
};
|
|
537
|
+
/** Recover past syntax errors. Invalid scalar source still throws HostError. */
|
|
538
|
+
declare const parseSourceRecovering: (source: string) => RecoveringParseResult;
|
|
539
|
+
type EntryResult = {
|
|
540
|
+
error: null;
|
|
541
|
+
kind: EntryKind | null;
|
|
542
|
+
tree: SyntaxNode;
|
|
543
|
+
} | {
|
|
544
|
+
error: ParseError;
|
|
545
|
+
/** The source ended before the Entry did, so more lines may finish it. */
|
|
546
|
+
incomplete: boolean;
|
|
547
|
+
tree: null;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Parse an Entry at a Session prompt (chapter 2, Entries). Its kind is null
|
|
551
|
+
* when it holds only blank lines and comments. Invalid scalar source throws
|
|
552
|
+
* HostError.
|
|
553
|
+
*/
|
|
554
|
+
declare const parseEntry: (source: string, isHandler: (name: string) => boolean) => EntryResult;
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region src/checker.d.ts
|
|
557
|
+
type DiagnosticCode = (typeof diagnosticCodes)[number];
|
|
558
|
+
type Diagnostic = {
|
|
559
|
+
code: DiagnosticCode;
|
|
560
|
+
message: string;
|
|
561
|
+
span: SourceSpan;
|
|
562
|
+
};
|
|
563
|
+
type ExistingName = Pick<Binding, 'kind' | 'contract' | 'importedFrom'> & {
|
|
564
|
+
handler?: ExistingName;
|
|
565
|
+
maySuspend?: boolean;
|
|
566
|
+
};
|
|
567
|
+
type CheckOptions = {
|
|
568
|
+
/** Names in older code units when checking a Script extension. */
|
|
569
|
+
existing?: Readonly<Record<string, ExistingName>>;
|
|
570
|
+
/** A Script's Grants, to check its Capability calls against; none checks none. */
|
|
571
|
+
grants?: GrantDecls;
|
|
572
|
+
/** Exports supplied by the Library loader; kind-only entries defer call-count checks. */
|
|
573
|
+
libraries?: Readonly<Record<string, Readonly<Record<string, LibraryExport>>>>;
|
|
574
|
+
/** Literal property names mapped to setter availability, by bound Object name. */
|
|
575
|
+
objectProperties?: Readonly<Record<string, Readonly<Record<string, boolean>>>>;
|
|
576
|
+
/** Well-known Host Object names bound at load. */
|
|
577
|
+
objects?: readonly string[];
|
|
578
|
+
/** Setter availability for an Owning Script's me. */
|
|
579
|
+
ownerProperties?: Readonly<Record<string, boolean>>;
|
|
580
|
+
/** Whether the source is a Script (the default) or a Library. */
|
|
581
|
+
unit?: 'script' | 'library';
|
|
582
|
+
};
|
|
583
|
+
type SemanticResult = {
|
|
584
|
+
diagnostics: readonly Diagnostic[];
|
|
585
|
+
ok: boolean;
|
|
586
|
+
tree: SemanticTree;
|
|
587
|
+
};
|
|
588
|
+
type CheckResult = (SemanticResult & {
|
|
589
|
+
error: null;
|
|
590
|
+
}) | {
|
|
591
|
+
diagnostics: readonly Diagnostic[];
|
|
592
|
+
error: ParseError;
|
|
593
|
+
ok: false;
|
|
594
|
+
tree: null;
|
|
595
|
+
};
|
|
596
|
+
/**
|
|
597
|
+
* Resolve bindings and check writes, named calls, constants and control flow.
|
|
598
|
+
* On recovered syntax, omit malformed constructs and check retained code.
|
|
599
|
+
*/
|
|
600
|
+
declare const checkSyntax: (syntax: SyntaxNode, options?: CheckOptions) => SemanticResult;
|
|
601
|
+
declare const checkSource: (source: string, options?: CheckOptions) => CheckResult;
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/talk.d.ts
|
|
604
|
+
/**
|
|
605
|
+
* Dedents NorthTalk source; rejects JS interpolation.
|
|
606
|
+
*
|
|
607
|
+
* Write NorthTalk's own interpolation as `\${…}` and its backticks as `` \` ``.
|
|
608
|
+
* Pass values as Request arguments instead of splicing them into source. The
|
|
609
|
+
* longest whitespace prefix shared by every non-blank line is removed, compared
|
|
610
|
+
* exactly, so tabs and spaces never match each other.
|
|
611
|
+
*/
|
|
612
|
+
declare const talk: (strings: TemplateStringsArray, ...values: unknown[]) => string;
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region src/plain.d.ts
|
|
615
|
+
/** Plain JS data, as `fromValue` writes it (ADR 0119). */
|
|
616
|
+
type PlainValue = null | boolean | string | Decimal | Uint8Array | Value | PlainValue[] | {
|
|
617
|
+
[key: string]: PlainValue;
|
|
618
|
+
} | Map<string, PlainValue>;
|
|
619
|
+
type ToValueOptions = {
|
|
620
|
+
/**
|
|
621
|
+
* `integer` reads safe integers through `num`; `decimal` uses `num` for
|
|
622
|
+
* any JS number. The default refuses JS numbers.
|
|
623
|
+
*/
|
|
624
|
+
numbers?: 'refuse' | 'integer' | 'decimal';
|
|
625
|
+
};
|
|
626
|
+
type FromValueOptions = {
|
|
627
|
+
maps?: 'object' | 'map';
|
|
628
|
+
numbers?: 'decimal' | 'string';
|
|
629
|
+
};
|
|
630
|
+
/**
|
|
631
|
+
* Plain JS data to a Value by the named constructors (ADR 0119). Anything
|
|
632
|
+
* the table doesn't name, and cyclic data, throws `invalid value`.
|
|
633
|
+
*/
|
|
634
|
+
declare const toValue: (plain: unknown, options?: ToValueOptions) => Value;
|
|
635
|
+
/** A Value as plain JS data (ADR 0119); kinds with no JS form stay Values. */
|
|
636
|
+
declare const fromValue: (v: Value, options?: FromValueOptions) => PlainValue;
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region src/encoding.d.ts
|
|
639
|
+
/**
|
|
640
|
+
* A Message Layer adapter's own spelling of a Function Value or a Text
|
|
641
|
+
* Pattern, which the Value Encoding doesn't hold.
|
|
642
|
+
*/
|
|
643
|
+
type AdapterEncoder = (v: Value) => string;
|
|
644
|
+
declare const encodeValue: (value: Value, adapter?: AdapterEncoder) => string;
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region src/constructs.d.ts
|
|
647
|
+
/** Chapter 3's kind names. */
|
|
648
|
+
declare const kindNames: ReadonlySet<string>;
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region src/json.d.ts
|
|
651
|
+
/** Read exact decimal digits, NFC strings and insertion-ordered maps. */
|
|
652
|
+
declare const decodeJson: (source: string) => Value;
|
|
653
|
+
/** Compact JSON, with canonical numbers and chapter 7's string escapes. */
|
|
654
|
+
declare const encodeJson: (value: Value) => string;
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region src/handlers.d.ts
|
|
657
|
+
/** Untyped Handler calls accept safe-integer JS numbers and plain data. */
|
|
658
|
+
type Handlers = {
|
|
659
|
+
[name: string]: (...args: (PlainValue | number | bigint)[]) => Promise<PlainValue>;
|
|
660
|
+
};
|
|
661
|
+
/** The Host supplies T without runtime checking of its arguments or results. */
|
|
662
|
+
type ScriptWithHandlers<T = Handlers> = Script & {
|
|
663
|
+
readonly handlers: T;
|
|
664
|
+
};
|
|
665
|
+
/**
|
|
666
|
+
* Calls invoke with integer-mode toValue arguments and default fromValue answers.
|
|
667
|
+
* The Script's existing driver or Host Pump loop still runs the Requests.
|
|
668
|
+
* Promise hooks, symbols and non-message properties read as undefined.
|
|
669
|
+
*/
|
|
670
|
+
declare const handlersOf: <T = Handlers>(script: Script) => T;
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region src/group-helper.d.ts
|
|
673
|
+
/** A Group whose driver closes explicitly or at the end of an `await using` scope. */
|
|
674
|
+
type DrivenGroup = Omit<Group, 'load'> & Pick<Drive, 'close' | typeof Symbol.asyncDispose> & {
|
|
675
|
+
load<T = Handlers>(o: LoadOptions): ScriptWithHandlers<T>;
|
|
676
|
+
};
|
|
677
|
+
/** The Zig Host Adapter requires its asynchronously created Core. */
|
|
678
|
+
type CreateGroupOptions$1 = DrivenGroupOptions & {
|
|
679
|
+
core: Core;
|
|
680
|
+
};
|
|
681
|
+
/** Creates a driven Group on the supplied Core; close has the driver's shutdown semantics. */
|
|
682
|
+
declare const createGroup$1: (o: CreateGroupOptions$1) => DrivenGroup;
|
|
683
|
+
//#endregion
|
|
684
|
+
//#region src/create-group.d.ts
|
|
685
|
+
/** Omitting core uses the process-wide TS Core. */
|
|
686
|
+
type CreateGroupOptions = DrivenGroupOptions & {
|
|
687
|
+
core?: Core;
|
|
688
|
+
};
|
|
689
|
+
/** Creates a driven Group that supports `await using` and explicit close(reason). */
|
|
690
|
+
declare const createGroup: (o: CreateGroupOptions) => DrivenGroup;
|
|
691
|
+
//#endregion
|
|
692
|
+
//#region src/inline-grants.d.ts
|
|
693
|
+
/** Argument and result types are supplied by the Host, without runtime checking. */
|
|
694
|
+
type InlineFunction = (...args: never[]) => unknown;
|
|
695
|
+
type InlineOperation = InlineFunction | {
|
|
696
|
+
arity?: number;
|
|
697
|
+
fn: InlineFunction;
|
|
698
|
+
} | {
|
|
699
|
+
arity?: number;
|
|
700
|
+
async: InlineFunction;
|
|
701
|
+
maxPendingMs?: number;
|
|
702
|
+
};
|
|
703
|
+
/**
|
|
704
|
+
* Defines one Capability per key and grants all its Operations. Arguments use
|
|
705
|
+
* default fromValue; results use integer-mode toValue. Arity is fn.length unless
|
|
706
|
+
* overridden, including for async functions, which also receive a final signal.
|
|
707
|
+
*/
|
|
708
|
+
declare const inlineGrants: (capabilities: Readonly<Record<string, Readonly<Record<string, InlineOperation>>>>) => Record<string, Grant<void>>;
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region src/manifest.d.ts
|
|
711
|
+
type MessageDecl = {
|
|
712
|
+
args?: readonly Shape[];
|
|
713
|
+
description?: string;
|
|
714
|
+
/** NorthTalk source, each sending this message. */
|
|
715
|
+
examples?: readonly string[];
|
|
716
|
+
name: string;
|
|
717
|
+
receivers?: readonly ObjectKind[];
|
|
718
|
+
};
|
|
719
|
+
type ManifestSpec = {
|
|
720
|
+
grants: Readonly<Record<string, Grant<any>>>;
|
|
721
|
+
kind: string;
|
|
722
|
+
libraries?: readonly Library[];
|
|
723
|
+
messages?: readonly MessageDecl[];
|
|
724
|
+
objectKinds?: readonly ObjectKind[];
|
|
725
|
+
objects?: Readonly<Record<string, ObjectKind>>;
|
|
726
|
+
/** The Owner Kind: one of objectKinds, the kind of `me` for tooling. */
|
|
727
|
+
ownerKind?: ObjectKind;
|
|
728
|
+
version: string;
|
|
729
|
+
};
|
|
730
|
+
/** Chapter 9's deterministic JSON file, ending in LF; never calls the Host. */
|
|
731
|
+
declare const exportManifest: (m: ManifestSpec) => string;
|
|
732
|
+
//#endregion
|
|
733
|
+
//#region src/lowering.d.ts
|
|
734
|
+
/** A construct whose lowering the Spec leaves unsettled; not a load diagnostic. */
|
|
735
|
+
declare class LoweringError extends Error {
|
|
736
|
+
readonly line: number;
|
|
737
|
+
readonly col: number;
|
|
738
|
+
constructor(line: number, col: number, message: string);
|
|
739
|
+
}
|
|
740
|
+
type CompileOptions = CheckOptions & {
|
|
741
|
+
/** The Script's or Library's name, which the disassembly's `unit` line shows. */
|
|
742
|
+
name: string;
|
|
743
|
+
};
|
|
744
|
+
type CompileResult = {
|
|
745
|
+
diagnostics: readonly Diagnostic[];
|
|
746
|
+
error: null;
|
|
747
|
+
unit: CodeUnit;
|
|
748
|
+
} | {
|
|
749
|
+
diagnostics: readonly Diagnostic[];
|
|
750
|
+
error: ParseError | null;
|
|
751
|
+
unit: null;
|
|
752
|
+
};
|
|
753
|
+
/** A checked Library's exports, for the Scripts and Libraries that import it. */
|
|
754
|
+
declare const exportsOf: (tree: SemanticTree) => Record<string, Exclude<LibraryExport, string>>;
|
|
755
|
+
/** Lower a checked semantic tree into its code unit. */
|
|
756
|
+
declare const lowerTree: (tree: SemanticTree, options: Pick<CompileOptions, "name" | "unit"> & {
|
|
757
|
+
existingVariables?: readonly string[];
|
|
758
|
+
}) => CodeUnit;
|
|
759
|
+
/**
|
|
760
|
+
* Parse, check and lower a Script or Library. The first syntax error, or any
|
|
761
|
+
* load diagnostic the checker reports, leaves no code unit.
|
|
762
|
+
*/
|
|
763
|
+
declare const compileSource: (source: string, options: CompileOptions) => CompileResult;
|
|
764
|
+
//#endregion
|
|
765
|
+
//#region src/generated/stdlib.d.ts
|
|
766
|
+
declare const stdlibSources: Record<string, string>;
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region src/documentation.d.ts
|
|
769
|
+
/**
|
|
770
|
+
* The source start of a top-level declaration including its attached marked
|
|
771
|
+
* comments. Tooling that submits it as an Entry keeps the exact block, even
|
|
772
|
+
* before an Import (which the Session Host refuses at the prompt).
|
|
773
|
+
*/
|
|
774
|
+
declare const declarationStart: (root: SyntaxNode, declaration: SyntaxNode) => number;
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region src/selectors.d.ts
|
|
777
|
+
declare const validMessageSelector: (message: string, arity: number) => boolean;
|
|
778
|
+
//#endregion
|
|
779
|
+
export { ToValueOptions as A, checkSyntax as B, handlersOf as C, encodeValue as D, kindNames as E, CheckResult as F, RecoveringParseResult as G, EntryResult as H, Diagnostic as I, parseSource as J, RecoveryDiagnostic as K, DiagnosticCode as L, toValue as M, talk as N, FromValueOptions as O, CheckOptions as P, units as Q, SemanticResult as R, ScriptWithHandlers as S, encodeJson as T, ParseError as U, EntryKind as V, ParseResult as W, builtins as X, parseSourceRecovering as Y, grammar as Z, createGroup as _, CompileResult as a, createGroup$1 as b, exportsOf as c, MessageDecl as d, exportManifest as f, CreateGroupOptions as g, inlineGrants as h, CompileOptions as i, fromValue as j, PlainValue as k, lowerTree as l, InlineOperation as m, declarationStart as n, LoweringError as o, InlineFunction as p, parseEntry as q, stdlibSources as r, compileSource as s, validMessageSelector as t, ManifestSpec as u, CreateGroupOptions$1 as v, decodeJson as w, Handlers as x, DrivenGroup as y, checkSource as z };
|