seroval 1.3.2 → 1.4.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 (125) hide show
  1. package/dist/cjs/development/index.cjs +2817 -2700
  2. package/dist/cjs/development/index.cjs.map +4 -4
  3. package/dist/cjs/production/index.cjs +3 -17
  4. package/dist/esm/development/index.mjs +2817 -2700
  5. package/dist/esm/development/index.mjs.map +4 -4
  6. package/dist/esm/production/index.mjs +3 -17
  7. package/dist/types/core/base-primitives.d.ts +3 -4
  8. package/dist/types/core/base-primitives.d.ts.map +1 -1
  9. package/dist/types/core/compat.d.ts +3 -2
  10. package/dist/types/core/compat.d.ts.map +1 -1
  11. package/dist/types/core/constants.d.ts +2 -1
  12. package/dist/types/core/constants.d.ts.map +1 -1
  13. package/dist/types/core/constructors.d.ts +54 -0
  14. package/dist/types/core/constructors.d.ts.map +1 -0
  15. package/dist/types/core/context/async-parser.d.ts +20 -0
  16. package/dist/types/core/context/async-parser.d.ts.map +1 -0
  17. package/dist/types/core/context/deserializer.d.ts +40 -38
  18. package/dist/types/core/context/deserializer.d.ts.map +1 -1
  19. package/dist/types/core/context/parser.d.ts +34 -19
  20. package/dist/types/core/context/parser.d.ts.map +1 -1
  21. package/dist/types/core/context/serializer.d.ts +38 -99
  22. package/dist/types/core/context/serializer.d.ts.map +1 -1
  23. package/dist/types/core/context/sync-parser.d.ts +59 -0
  24. package/dist/types/core/context/sync-parser.d.ts.map +1 -0
  25. package/dist/types/core/cross/index.d.ts +12 -13
  26. package/dist/types/core/cross/index.d.ts.map +1 -1
  27. package/dist/types/core/errors.d.ts +9 -0
  28. package/dist/types/core/errors.d.ts.map +1 -1
  29. package/dist/types/core/function-string.d.ts +2 -2
  30. package/dist/types/core/function-string.d.ts.map +1 -1
  31. package/dist/types/core/literals.d.ts.map +1 -1
  32. package/dist/types/core/node.d.ts +1 -1
  33. package/dist/types/core/node.d.ts.map +1 -1
  34. package/dist/types/core/plugin.d.ts +13 -11
  35. package/dist/types/core/plugin.d.ts.map +1 -1
  36. package/dist/types/core/reference.d.ts.map +1 -1
  37. package/dist/types/core/special-reference.d.ts +3 -2
  38. package/dist/types/core/special-reference.d.ts.map +1 -1
  39. package/dist/types/core/stream.d.ts +1 -2
  40. package/dist/types/core/stream.d.ts.map +1 -1
  41. package/dist/types/core/string.d.ts.map +1 -1
  42. package/dist/types/core/symbols.d.ts +14 -0
  43. package/dist/types/core/symbols.d.ts.map +1 -0
  44. package/dist/types/core/tree/index.d.ts +7 -3
  45. package/dist/types/core/tree/index.d.ts.map +1 -1
  46. package/dist/types/core/types.d.ts +4 -11
  47. package/dist/types/core/types.d.ts.map +1 -1
  48. package/dist/types/core/utils/iterator-to-sequence.d.ts.map +1 -1
  49. package/dist/types/index.d.ts +10 -5
  50. package/dist/types/index.d.ts.map +1 -1
  51. package/package.json +18 -21
  52. package/dist/types/core/context/parser/async.d.ts +0 -24
  53. package/dist/types/core/context/parser/async.d.ts.map +0 -1
  54. package/dist/types/core/context/parser/stream.d.ts +0 -43
  55. package/dist/types/core/context/parser/stream.d.ts.map +0 -1
  56. package/dist/types/core/context/parser/sync.d.ts +0 -30
  57. package/dist/types/core/context/parser/sync.d.ts.map +0 -1
  58. package/dist/types/core/cross/async.d.ts +0 -8
  59. package/dist/types/core/cross/async.d.ts.map +0 -1
  60. package/dist/types/core/cross/deserializer.d.ts +0 -9
  61. package/dist/types/core/cross/deserializer.d.ts.map +0 -1
  62. package/dist/types/core/cross/parser.d.ts +0 -6
  63. package/dist/types/core/cross/parser.d.ts.map +0 -1
  64. package/dist/types/core/cross/serializer.d.ts +0 -16
  65. package/dist/types/core/cross/serializer.d.ts.map +0 -1
  66. package/dist/types/core/cross/stream.d.ts +0 -8
  67. package/dist/types/core/cross/stream.d.ts.map +0 -1
  68. package/dist/types/core/cross/sync.d.ts +0 -8
  69. package/dist/types/core/cross/sync.d.ts.map +0 -1
  70. package/dist/types/core/tree/async.d.ts +0 -8
  71. package/dist/types/core/tree/async.d.ts.map +0 -1
  72. package/dist/types/core/tree/deserializer.d.ts +0 -13
  73. package/dist/types/core/tree/deserializer.d.ts.map +0 -1
  74. package/dist/types/core/tree/serializer.d.ts +0 -29
  75. package/dist/types/core/tree/serializer.d.ts.map +0 -1
  76. package/dist/types/core/tree/sync.d.ts +0 -8
  77. package/dist/types/core/tree/sync.d.ts.map +0 -1
  78. package/dist/types/core/utils/assert.d.ts +0 -2
  79. package/dist/types/core/utils/assert.d.ts.map +0 -1
  80. package/dist/types/core/utils/deferred.d.ts +0 -7
  81. package/dist/types/core/utils/deferred.d.ts.map +0 -1
  82. package/src/core/Serializer.ts +0 -119
  83. package/src/core/base-primitives.ts +0 -542
  84. package/src/core/compat.ts +0 -20
  85. package/src/core/constants.ts +0 -185
  86. package/src/core/context/deserializer.ts +0 -456
  87. package/src/core/context/parser/async.ts +0 -495
  88. package/src/core/context/parser/stream.ts +0 -323
  89. package/src/core/context/parser/sync.ts +0 -404
  90. package/src/core/context/parser.ts +0 -270
  91. package/src/core/context/serializer.ts +0 -1180
  92. package/src/core/cross/async.ts +0 -9
  93. package/src/core/cross/deserializer.ts +0 -16
  94. package/src/core/cross/index.ts +0 -170
  95. package/src/core/cross/parser.ts +0 -7
  96. package/src/core/cross/serializer.ts +0 -72
  97. package/src/core/cross/stream.ts +0 -9
  98. package/src/core/cross/sync.ts +0 -9
  99. package/src/core/errors.ts +0 -102
  100. package/src/core/function-string.ts +0 -31
  101. package/src/core/keys.ts +0 -17
  102. package/src/core/literals.ts +0 -43
  103. package/src/core/node.ts +0 -40
  104. package/src/core/opaque-reference.ts +0 -9
  105. package/src/core/plugin.ts +0 -91
  106. package/src/core/reference.ts +0 -63
  107. package/src/core/special-reference.ts +0 -114
  108. package/src/core/stream.ts +0 -205
  109. package/src/core/string.ts +0 -84
  110. package/src/core/tree/async.ts +0 -9
  111. package/src/core/tree/deserializer.ts +0 -26
  112. package/src/core/tree/index.ts +0 -111
  113. package/src/core/tree/serializer.ts +0 -98
  114. package/src/core/tree/sync.ts +0 -9
  115. package/src/core/types.ts +0 -370
  116. package/src/core/utils/assert.ts +0 -5
  117. package/src/core/utils/deferred.ts +0 -22
  118. package/src/core/utils/error.ts +0 -73
  119. package/src/core/utils/get-identifier.ts +0 -18
  120. package/src/core/utils/get-object-flag.ts +0 -14
  121. package/src/core/utils/is-valid-identifier.ts +0 -12
  122. package/src/core/utils/iterator-to-sequence.ts +0 -66
  123. package/src/core/utils/promise-to-result.ts +0 -9
  124. package/src/core/utils/typed-array.ts +0 -56
  125. package/src/index.ts +0 -18
@@ -1,119 +0,0 @@
1
- import { crossSerializeStream } from './cross';
2
- import {
3
- resolvePlugins,
4
- type Plugin,
5
- type PluginAccessOptions,
6
- } from './plugin';
7
- import { serializeString } from './string';
8
-
9
- export interface SerializerOptions extends PluginAccessOptions {
10
- globalIdentifier: string;
11
- scopeId?: string;
12
- disabledFeatures?: number;
13
- onData: (result: string) => void;
14
- onError: (error: unknown) => void;
15
- onDone?: () => void;
16
- }
17
-
18
- export default class Serializer {
19
- private alive = true;
20
-
21
- private flushed = false;
22
-
23
- private done = false;
24
-
25
- private pending = 0;
26
-
27
- private cleanups: (() => void)[] = [];
28
-
29
- private refs = new Map<unknown, number>();
30
-
31
- private plugins?: Plugin<any, any>[];
32
-
33
- constructor(private options: SerializerOptions) {
34
- this.plugins = resolvePlugins(options.plugins);
35
- }
36
-
37
- keys = new Set<string>();
38
-
39
- write(key: string, value: unknown): void {
40
- if (this.alive && !this.flushed) {
41
- this.pending++;
42
- this.keys.add(key);
43
- this.cleanups.push(
44
- crossSerializeStream(value, {
45
- plugins: this.plugins,
46
- scopeId: this.options.scopeId,
47
- refs: this.refs,
48
- disabledFeatures: this.options.disabledFeatures,
49
- onError: this.options.onError,
50
- onSerialize: (data, initial) => {
51
- if (this.alive) {
52
- this.options.onData(
53
- initial
54
- ? this.options.globalIdentifier +
55
- '["' +
56
- serializeString(key) +
57
- '"]=' +
58
- data
59
- : data,
60
- );
61
- }
62
- },
63
- onDone: () => {
64
- if (this.alive) {
65
- this.pending--;
66
- if (
67
- this.pending <= 0 &&
68
- this.flushed &&
69
- !this.done &&
70
- this.options.onDone
71
- ) {
72
- this.options.onDone();
73
- this.done = true;
74
- }
75
- }
76
- },
77
- }),
78
- );
79
- }
80
- }
81
-
82
- ids = 0;
83
-
84
- private getNextID(): string {
85
- while (this.keys.has('' + this.ids)) {
86
- this.ids++;
87
- }
88
- return '' + this.ids;
89
- }
90
-
91
- push(value: unknown): string {
92
- const newID = this.getNextID();
93
- this.write(newID, value);
94
- return newID;
95
- }
96
-
97
- flush(): void {
98
- if (this.alive) {
99
- this.flushed = true;
100
- if (this.pending <= 0 && !this.done && this.options.onDone) {
101
- this.options.onDone();
102
- this.done = true;
103
- }
104
- }
105
- }
106
-
107
- close(): void {
108
- if (this.alive) {
109
- for (let i = 0, len = this.cleanups.length; i < len; i++) {
110
- this.cleanups[i]();
111
- }
112
- if (!this.done && this.options.onDone) {
113
- this.options.onDone();
114
- this.done = true;
115
- }
116
- this.alive = false;
117
- }
118
- }
119
- }
@@ -1,542 +0,0 @@
1
- import type { WellKnownSymbols } from './constants';
2
- import { INV_SYMBOL_REF, NIL, SerovalNodeType } from './constants';
3
- import {
4
- INFINITY_NODE,
5
- NAN_NODE,
6
- NEG_INFINITY_NODE,
7
- NEG_ZERO_NODE,
8
- } from './literals';
9
- import { createSerovalNode } from './node';
10
- import { getReferenceID } from './reference';
11
- import { serializeString } from './string';
12
- import type {
13
- SerovalAggregateErrorNode,
14
- SerovalArrayBufferNode,
15
- SerovalArrayNode,
16
- SerovalAsyncIteratorFactoryInstanceNode,
17
- SerovalBigIntNode,
18
- SerovalBigIntTypedArrayNode,
19
- SerovalBoxedNode,
20
- SerovalConstantNode,
21
- SerovalDataViewNode,
22
- SerovalDateNode,
23
- SerovalErrorNode,
24
- SerovalIndexedValueNode,
25
- SerovalIteratorFactoryInstanceNode,
26
- SerovalNode,
27
- SerovalNodeWithID,
28
- SerovalNumberNode,
29
- SerovalObjectRecordNode,
30
- SerovalPluginNode,
31
- SerovalReferenceNode,
32
- SerovalRegExpNode,
33
- SerovalSetNode,
34
- SerovalStreamConstructorNode,
35
- SerovalStreamNextNode,
36
- SerovalStreamReturnNode,
37
- SerovalStreamThrowNode,
38
- SerovalStringNode,
39
- SerovalTypedArrayNode,
40
- SerovalWKSymbolNode,
41
- } from './types';
42
- import { getErrorConstructor } from './utils/error';
43
- import { getObjectFlag } from './utils/get-object-flag';
44
- import type {
45
- BigIntTypedArrayValue,
46
- TypedArrayValue,
47
- } from './utils/typed-array';
48
-
49
- export function createNumberNode(
50
- value: number,
51
- ): SerovalConstantNode | SerovalNumberNode {
52
- switch (value) {
53
- case Number.POSITIVE_INFINITY:
54
- return INFINITY_NODE;
55
- case Number.NEGATIVE_INFINITY:
56
- return NEG_INFINITY_NODE;
57
- }
58
- if (value !== value) {
59
- return NAN_NODE;
60
- }
61
- if (Object.is(value, -0)) {
62
- return NEG_ZERO_NODE;
63
- }
64
- return createSerovalNode(
65
- SerovalNodeType.Number,
66
- NIL,
67
- value,
68
- NIL,
69
- NIL,
70
- NIL,
71
- NIL,
72
- NIL,
73
- NIL,
74
- NIL,
75
- NIL,
76
- NIL,
77
- );
78
- }
79
-
80
- export function createStringNode(value: string): SerovalStringNode {
81
- return createSerovalNode(
82
- SerovalNodeType.String,
83
- NIL,
84
- serializeString(value),
85
- NIL,
86
- NIL,
87
- NIL,
88
- NIL,
89
- NIL,
90
- NIL,
91
- NIL,
92
- NIL,
93
- NIL,
94
- );
95
- }
96
-
97
- export function createBigIntNode(current: bigint): SerovalBigIntNode {
98
- return createSerovalNode(
99
- SerovalNodeType.BigInt,
100
- NIL,
101
- '' + current,
102
- NIL,
103
- NIL,
104
- NIL,
105
- NIL,
106
- NIL,
107
- NIL,
108
- NIL,
109
- NIL,
110
- NIL,
111
- );
112
- }
113
-
114
- export function createIndexedValueNode(id: number): SerovalIndexedValueNode {
115
- return createSerovalNode(
116
- SerovalNodeType.IndexedValue,
117
- id,
118
- NIL,
119
- NIL,
120
- NIL,
121
- NIL,
122
- NIL,
123
- NIL,
124
- NIL,
125
- NIL,
126
- NIL,
127
- NIL,
128
- );
129
- }
130
-
131
- export function createDateNode(id: number, current: Date): SerovalDateNode {
132
- const timestamp = current.valueOf();
133
- return createSerovalNode(
134
- SerovalNodeType.Date,
135
- id,
136
- timestamp !== timestamp ? '' : current.toISOString(),
137
- NIL,
138
- NIL,
139
- NIL,
140
- NIL,
141
- NIL,
142
- NIL,
143
- NIL,
144
- NIL,
145
- NIL,
146
- );
147
- }
148
-
149
- export function createRegExpNode(
150
- id: number,
151
- current: RegExp,
152
- ): SerovalRegExpNode {
153
- return createSerovalNode(
154
- SerovalNodeType.RegExp,
155
- id,
156
- NIL,
157
- NIL,
158
- serializeString(current.source),
159
- current.flags,
160
- NIL,
161
- NIL,
162
- NIL,
163
- NIL,
164
- NIL,
165
- NIL,
166
- );
167
- }
168
-
169
- export function createArrayBufferNode(
170
- id: number,
171
- current: ArrayBuffer,
172
- ): SerovalArrayBufferNode {
173
- const bytes = new Uint8Array(current);
174
- const len = bytes.length;
175
- const values = new Array<number>(len);
176
- for (let i = 0; i < len; i++) {
177
- values[i] = bytes[i];
178
- }
179
- return createSerovalNode(
180
- SerovalNodeType.ArrayBuffer,
181
- id,
182
- values,
183
- NIL,
184
- NIL,
185
- NIL,
186
- NIL,
187
- NIL,
188
- NIL,
189
- NIL,
190
- NIL,
191
- NIL,
192
- );
193
- }
194
-
195
- export function createWKSymbolNode(
196
- id: number,
197
- current: WellKnownSymbols,
198
- ): SerovalWKSymbolNode {
199
- return createSerovalNode(
200
- SerovalNodeType.WKSymbol,
201
- id,
202
- INV_SYMBOL_REF[current],
203
- NIL,
204
- NIL,
205
- NIL,
206
- NIL,
207
- NIL,
208
- NIL,
209
- NIL,
210
- NIL,
211
- NIL,
212
- );
213
- }
214
-
215
- export function createReferenceNode<T>(
216
- id: number,
217
- ref: T,
218
- ): SerovalReferenceNode {
219
- return createSerovalNode(
220
- SerovalNodeType.Reference,
221
- id,
222
- serializeString(getReferenceID(ref)),
223
- NIL,
224
- NIL,
225
- NIL,
226
- NIL,
227
- NIL,
228
- NIL,
229
- NIL,
230
- NIL,
231
- NIL,
232
- );
233
- }
234
-
235
- export function createPluginNode(
236
- id: number,
237
- tag: string,
238
- value: unknown,
239
- ): SerovalPluginNode {
240
- return createSerovalNode(
241
- SerovalNodeType.Plugin,
242
- id,
243
- value,
244
- NIL,
245
- serializeString(tag),
246
- NIL,
247
- NIL,
248
- NIL,
249
- NIL,
250
- NIL,
251
- NIL,
252
- NIL,
253
- );
254
- }
255
-
256
- export function createArrayNode(
257
- id: number,
258
- current: unknown[],
259
- parsedItems: SerovalNode[],
260
- ): SerovalArrayNode {
261
- return createSerovalNode(
262
- SerovalNodeType.Array,
263
- id,
264
- NIL,
265
- current.length,
266
- NIL,
267
- NIL,
268
- NIL,
269
- NIL,
270
- parsedItems,
271
- NIL,
272
- NIL,
273
- getObjectFlag(current),
274
- );
275
- }
276
-
277
- export function createBoxedNode(
278
- id: number,
279
- boxed: SerovalNode,
280
- ): SerovalBoxedNode {
281
- return createSerovalNode(
282
- SerovalNodeType.Boxed,
283
- id,
284
- NIL,
285
- NIL,
286
- NIL,
287
- NIL,
288
- NIL,
289
- NIL,
290
- NIL,
291
- boxed,
292
- NIL,
293
- NIL,
294
- );
295
- }
296
-
297
- export function createTypedArrayNode(
298
- id: number,
299
- current: TypedArrayValue,
300
- buffer: SerovalNode,
301
- ): SerovalTypedArrayNode {
302
- return createSerovalNode(
303
- SerovalNodeType.TypedArray,
304
- id,
305
- NIL,
306
- current.length,
307
- current.constructor.name,
308
- NIL,
309
- NIL,
310
- NIL,
311
- NIL,
312
- buffer,
313
- current.byteOffset,
314
- NIL,
315
- );
316
- }
317
-
318
- export function createBigIntTypedArrayNode(
319
- id: number,
320
- current: BigIntTypedArrayValue,
321
- buffer: SerovalNode,
322
- ): SerovalBigIntTypedArrayNode {
323
- return createSerovalNode(
324
- SerovalNodeType.BigIntTypedArray,
325
- id,
326
- NIL,
327
- current.length,
328
- current.constructor.name,
329
- NIL,
330
- NIL,
331
- NIL,
332
- NIL,
333
- buffer,
334
- current.byteOffset,
335
- NIL,
336
- );
337
- }
338
-
339
- export function createDataViewNode(
340
- id: number,
341
- current: DataView,
342
- buffer: SerovalNode,
343
- ): SerovalDataViewNode {
344
- return createSerovalNode(
345
- SerovalNodeType.DataView,
346
- id,
347
- NIL,
348
- current.byteLength,
349
- NIL,
350
- NIL,
351
- NIL,
352
- NIL,
353
- NIL,
354
- buffer,
355
- current.byteOffset,
356
- NIL,
357
- );
358
- }
359
-
360
- export function createErrorNode(
361
- id: number,
362
- current: Error,
363
- options: SerovalObjectRecordNode | undefined,
364
- ): SerovalErrorNode {
365
- return createSerovalNode(
366
- SerovalNodeType.Error,
367
- id,
368
- getErrorConstructor(current),
369
- NIL,
370
- NIL,
371
- serializeString(current.message),
372
- options,
373
- NIL,
374
- NIL,
375
- NIL,
376
- NIL,
377
- NIL,
378
- );
379
- }
380
-
381
- export function createAggregateErrorNode(
382
- id: number,
383
- current: AggregateError,
384
- options: SerovalObjectRecordNode | undefined,
385
- ): SerovalAggregateErrorNode {
386
- return createSerovalNode(
387
- SerovalNodeType.AggregateError,
388
- id,
389
- getErrorConstructor(current),
390
- NIL,
391
- NIL,
392
- serializeString(current.message),
393
- options,
394
- NIL,
395
- NIL,
396
- NIL,
397
- NIL,
398
- NIL,
399
- );
400
- }
401
-
402
- export function createSetNode(
403
- id: number,
404
- size: number,
405
- items: SerovalNode[],
406
- ): SerovalSetNode {
407
- return createSerovalNode(
408
- SerovalNodeType.Set,
409
- id,
410
- NIL,
411
- size,
412
- NIL,
413
- NIL,
414
- NIL,
415
- NIL,
416
- items,
417
- NIL,
418
- NIL,
419
- NIL,
420
- );
421
- }
422
-
423
- export function createIteratorFactoryInstanceNode(
424
- factory: SerovalNodeWithID,
425
- items: SerovalNode,
426
- ): SerovalIteratorFactoryInstanceNode {
427
- return createSerovalNode(
428
- SerovalNodeType.IteratorFactoryInstance,
429
- NIL,
430
- NIL,
431
- NIL,
432
- NIL,
433
- NIL,
434
- NIL,
435
- NIL,
436
- [factory, items],
437
- NIL,
438
- NIL,
439
- NIL,
440
- );
441
- }
442
-
443
- export function createAsyncIteratorFactoryInstanceNode(
444
- factory: SerovalNodeWithID,
445
- items: SerovalNode,
446
- ): SerovalAsyncIteratorFactoryInstanceNode {
447
- return createSerovalNode(
448
- SerovalNodeType.AsyncIteratorFactoryInstance,
449
- NIL,
450
- NIL,
451
- NIL,
452
- NIL,
453
- NIL,
454
- NIL,
455
- NIL,
456
- [factory, items],
457
- NIL,
458
- NIL,
459
- NIL,
460
- );
461
- }
462
-
463
- export function createStreamConstructorNode(
464
- id: number,
465
- factory: SerovalNodeWithID,
466
- sequence: SerovalNode[],
467
- ): SerovalStreamConstructorNode {
468
- return createSerovalNode(
469
- SerovalNodeType.StreamConstructor,
470
- id,
471
- NIL,
472
- NIL,
473
- NIL,
474
- NIL,
475
- NIL,
476
- NIL,
477
- sequence,
478
- factory,
479
- NIL,
480
- NIL,
481
- );
482
- }
483
-
484
- export function createStreamNextNode(
485
- id: number,
486
- parsed: SerovalNode,
487
- ): SerovalStreamNextNode {
488
- return createSerovalNode(
489
- SerovalNodeType.StreamNext,
490
- id,
491
- NIL,
492
- NIL,
493
- NIL,
494
- NIL,
495
- NIL,
496
- NIL,
497
- NIL,
498
- parsed,
499
- NIL,
500
- NIL,
501
- );
502
- }
503
-
504
- export function createStreamThrowNode(
505
- id: number,
506
- parsed: SerovalNode,
507
- ): SerovalStreamThrowNode {
508
- return createSerovalNode(
509
- SerovalNodeType.StreamThrow,
510
- id,
511
- NIL,
512
- NIL,
513
- NIL,
514
- NIL,
515
- NIL,
516
- NIL,
517
- NIL,
518
- parsed,
519
- NIL,
520
- NIL,
521
- );
522
- }
523
-
524
- export function createStreamReturnNode(
525
- id: number,
526
- parsed: SerovalNode,
527
- ): SerovalStreamReturnNode {
528
- return createSerovalNode(
529
- SerovalNodeType.StreamReturn,
530
- id,
531
- NIL,
532
- NIL,
533
- NIL,
534
- NIL,
535
- NIL,
536
- NIL,
537
- NIL,
538
- parsed,
539
- NIL,
540
- NIL,
541
- );
542
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * References
3
- * - https://compat-table.github.io/compat-table/es6/
4
- * - MDN
5
- */
6
-
7
- export const enum Feature {
8
- AggregateError = 0x01,
9
- ArrowFunction = 0x02,
10
- ErrorPrototypeStack = 0x04,
11
- ObjectAssign = 0x08,
12
- BigIntTypedArray = 0x10,
13
- }
14
-
15
- export const ALL_ENABLED =
16
- Feature.AggregateError |
17
- Feature.ArrowFunction |
18
- Feature.ErrorPrototypeStack |
19
- Feature.ObjectAssign |
20
- Feature.BigIntTypedArray;