@ibyar/expressions 1.0.0 → 1.1.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.
Files changed (101) hide show
  1. package/README.md +48 -1
  2. package/api/class/class.js +143 -93
  3. package/api/class/class.js.map +1 -1
  4. package/api/class/decorator.js +8 -3
  5. package/api/class/decorator.js.map +1 -1
  6. package/api/computing/call.js +8 -3
  7. package/api/computing/call.js.map +1 -1
  8. package/api/computing/debugger.js +8 -3
  9. package/api/computing/debugger.js.map +1 -1
  10. package/api/computing/new.js +8 -3
  11. package/api/computing/new.js.map +1 -1
  12. package/api/computing/rest.js +8 -3
  13. package/api/computing/rest.js.map +1 -1
  14. package/api/computing/return.js +8 -3
  15. package/api/computing/return.js.map +1 -1
  16. package/api/computing/spread.js +8 -3
  17. package/api/computing/spread.js.map +1 -1
  18. package/api/computing/throw.js +38 -23
  19. package/api/computing/throw.js.map +1 -1
  20. package/api/computing/yield.js +8 -3
  21. package/api/computing/yield.js.map +1 -1
  22. package/api/definition/array.js +23 -13
  23. package/api/definition/array.js.map +1 -1
  24. package/api/definition/bind.js +8 -3
  25. package/api/definition/bind.js.map +1 -1
  26. package/api/definition/comment.js +8 -3
  27. package/api/definition/comment.js.map +1 -1
  28. package/api/definition/function.js +53 -33
  29. package/api/definition/function.js.map +1 -1
  30. package/api/definition/member.js +8 -3
  31. package/api/definition/member.js.map +1 -1
  32. package/api/definition/object.js +38 -23
  33. package/api/definition/object.js.map +1 -1
  34. package/api/definition/statement.js +8 -3
  35. package/api/definition/statement.js.map +1 -1
  36. package/api/definition/values.js +68 -43
  37. package/api/definition/values.js.map +1 -1
  38. package/api/module/common.js +8 -3
  39. package/api/module/common.js.map +1 -1
  40. package/api/module/export.js +53 -33
  41. package/api/module/export.js.map +1 -1
  42. package/api/module/import.js +68 -43
  43. package/api/module/import.js.map +1 -1
  44. package/api/operators/assignment.js +6 -2
  45. package/api/operators/assignment.js.map +1 -1
  46. package/api/operators/await.js +8 -3
  47. package/api/operators/await.js.map +1 -1
  48. package/api/operators/binary.js +6 -2
  49. package/api/operators/binary.js.map +1 -1
  50. package/api/operators/chaining.js +8 -3
  51. package/api/operators/chaining.js.map +1 -1
  52. package/api/operators/comma.js +8 -3
  53. package/api/operators/comma.js.map +1 -1
  54. package/api/operators/grouping.js +8 -3
  55. package/api/operators/grouping.js.map +1 -1
  56. package/api/operators/logical.js +6 -2
  57. package/api/operators/logical.js.map +1 -1
  58. package/api/operators/pipeline.js +8 -3
  59. package/api/operators/pipeline.js.map +1 -1
  60. package/api/operators/ternary.js +8 -3
  61. package/api/operators/ternary.js.map +1 -1
  62. package/api/operators/unary.js +6 -2
  63. package/api/operators/unary.js.map +1 -1
  64. package/api/operators/update.js +6 -2
  65. package/api/operators/update.js.map +1 -1
  66. package/api/program.js +8 -3
  67. package/api/program.js.map +1 -1
  68. package/api/statement/control/block.js +8 -3
  69. package/api/statement/control/block.js.map +1 -1
  70. package/api/statement/control/empty.js +8 -3
  71. package/api/statement/control/empty.js.map +1 -1
  72. package/api/statement/control/if.js +8 -3
  73. package/api/statement/control/if.js.map +1 -1
  74. package/api/statement/control/switch.js +38 -23
  75. package/api/statement/control/switch.js.map +1 -1
  76. package/api/statement/control/terminate.js +38 -23
  77. package/api/statement/control/terminate.js.map +1 -1
  78. package/api/statement/control/with.js +8 -3
  79. package/api/statement/control/with.js.map +1 -1
  80. package/api/statement/declarations/declares.js +23 -13
  81. package/api/statement/declarations/declares.js.map +1 -1
  82. package/api/statement/iterations/for.js +53 -33
  83. package/api/statement/iterations/for.js.map +1 -1
  84. package/api/statement/iterations/while.js +23 -13
  85. package/api/statement/iterations/while.js.map +1 -1
  86. package/package.json +5 -5
  87. package/scope/builder.d.ts +27 -0
  88. package/scope/builder.d.ts.map +1 -0
  89. package/scope/builder.js +73 -0
  90. package/scope/builder.js.map +1 -0
  91. package/scope/stack.js +1 -1
  92. package/scope/stack.js.map +1 -1
  93. package/v8/enums.js +2 -4
  94. package/v8/enums.js.map +1 -1
  95. package/v8/stream.js +1 -2
  96. package/v8/stream.js.map +1 -1
  97. package/v8/token.js +1 -2
  98. package/v8/token.js.map +1 -1
  99. package/v8/nodes.d.ts +0 -0
  100. package/v8/nodes.js +0 -2
  101. package/v8/nodes.js.map +0 -1
package/README.md CHANGED
@@ -276,4 +276,51 @@ expressionVisitor.visit(ast, (expression, type, control) => {
276
276
  }
277
277
  });
278
278
 
279
- ```
279
+ ```
280
+
281
+
282
+ ### How to use Reactive Scope:
283
+
284
+ reactive scope is used to
285
+
286
+ ```ts
287
+ import { JavaScriptParser, ReactiveScope, Stack } from '@ibyar/expressions';
288
+
289
+ // parse JS code
290
+ const ast = JavaScriptParser.parse(`
291
+ const x = 'Hello';
292
+ const y = "World";
293
+
294
+ let z = x + ' ' + y + '!';
295
+ z = 123 + 456;
296
+ z = (x + ' ' + y).toUpperCase();
297
+ z = 'Reactive Scope is Awesome!!';
298
+
299
+ `);
300
+
301
+ // create reactive scope, can listen to changes of variables
302
+ const reactiveScope = ReactiveScope.blockScope();
303
+
304
+
305
+ // listen for changes of 'z' variable
306
+ const zSubscription = reactiveScope.subscribe('z', (nz, oz) => {
307
+ console.log('new value of Z = ' + nz, 'old value of Z = ' + oz);
308
+ });
309
+
310
+ // listen for changes of 'z' const
311
+ const xSubscription = reactiveScope.subscribe('x', (nx, ox) => {
312
+ console.log('new value of X = ' + nx, 'old value of X = ' + ox);
313
+ });
314
+
315
+ // create stack
316
+ const stack = new Stack(reactiveScope);
317
+
318
+ // execute js code
319
+ ast.get(stack);
320
+
321
+ // unsubscribe from all created ScopeSubscription
322
+ zSubscription.unsubscribe();
323
+ xSubscription.unsubscribe();
324
+
325
+
326
+ ```
@@ -86,15 +86,19 @@ class ClassInitializer {
86
86
  /**
87
87
  * A `super` pseudo-expression.
88
88
  */
89
- export let Super = (() => {
89
+ let Super = (() => {
90
90
  let _classDecorators = [Deserializer('Super')];
91
91
  let _classDescriptor;
92
92
  let _classExtraInitializers = [];
93
93
  let _classThis;
94
- var Super = class extends AbstractExpressionNode {
94
+ let _classSuper = AbstractExpressionNode;
95
+ var Super = class extends _classSuper {
96
+ static { _classThis = this; }
95
97
  static {
96
- __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers);
98
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
99
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
97
100
  Super = _classThis = _classDescriptor.value;
101
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
98
102
  __runInitializers(_classThis, _classExtraInitializers);
99
103
  }
100
104
  static fromJSON(node) {
@@ -124,6 +128,7 @@ export let Super = (() => {
124
128
  };
125
129
  return Super = _classThis;
126
130
  })();
131
+ export { Super };
127
132
  /**
128
133
  * MetaProperty node represents
129
134
  * - `new.target` meta property in ES2015.
@@ -131,16 +136,20 @@ export let Super = (() => {
131
136
  *
132
137
  * In the future, it will represent other meta properties as well.
133
138
  */
134
- export let MetaProperty = (() => {
135
- let _classDecorators_1 = [Deserializer('MetaProperty')];
136
- let _classDescriptor_1;
137
- let _classExtraInitializers_1 = [];
138
- let _classThis_1;
139
- var MetaProperty = class extends AbstractExpressionNode {
139
+ let MetaProperty = (() => {
140
+ let _classDecorators = [Deserializer('MetaProperty')];
141
+ let _classDescriptor;
142
+ let _classExtraInitializers = [];
143
+ let _classThis;
144
+ let _classSuper = AbstractExpressionNode;
145
+ var MetaProperty = class extends _classSuper {
146
+ static { _classThis = this; }
140
147
  static {
141
- __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1);
142
- MetaProperty = _classThis_1 = _classDescriptor_1.value;
143
- __runInitializers(_classThis_1, _classExtraInitializers_1);
148
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
149
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
150
+ MetaProperty = _classThis = _classDescriptor.value;
151
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
152
+ __runInitializers(_classThis, _classExtraInitializers);
144
153
  }
145
154
  meta;
146
155
  property;
@@ -188,21 +197,26 @@ export let MetaProperty = (() => {
188
197
  };
189
198
  }
190
199
  };
191
- return MetaProperty = _classThis_1;
200
+ return MetaProperty = _classThis;
192
201
  })();
202
+ export { MetaProperty };
193
203
  /**
194
204
  * A private identifier refers to private class elements. For a private name `#a`, its name is `a`.
195
205
  */
196
- export let PrivateIdentifier = (() => {
197
- let _classDecorators_2 = [Deserializer('PrivateIdentifier')];
198
- let _classDescriptor_2;
199
- let _classExtraInitializers_2 = [];
200
- let _classThis_2;
201
- var PrivateIdentifier = class extends Identifier {
206
+ let PrivateIdentifier = (() => {
207
+ let _classDecorators = [Deserializer('PrivateIdentifier')];
208
+ let _classDescriptor;
209
+ let _classExtraInitializers = [];
210
+ let _classThis;
211
+ let _classSuper = Identifier;
212
+ var PrivateIdentifier = class extends _classSuper {
213
+ static { _classThis = this; }
202
214
  static {
203
- __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2);
204
- PrivateIdentifier = _classThis_2 = _classDescriptor_2.value;
205
- __runInitializers(_classThis_2, _classExtraInitializers_2);
215
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
216
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
217
+ PrivateIdentifier = _classThis = _classDescriptor.value;
218
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
219
+ __runInitializers(_classThis, _classExtraInitializers);
206
220
  }
207
221
  static fromJSON(node) {
208
222
  return new PrivateIdentifier(node.name, node.range, node.loc);
@@ -218,21 +232,26 @@ export let PrivateIdentifier = (() => {
218
232
  return `#${this.name}`;
219
233
  }
220
234
  };
221
- return PrivateIdentifier = _classThis_2;
235
+ return PrivateIdentifier = _classThis;
222
236
  })();
237
+ export { PrivateIdentifier };
223
238
  /**
224
239
  * A static block static { } is a block statement serving as an additional static initializer.
225
240
  */
226
- export let StaticBlock = (() => {
227
- let _classDecorators_3 = [Deserializer('StaticBlock')];
228
- let _classDescriptor_3;
229
- let _classExtraInitializers_3 = [];
230
- let _classThis_3;
231
- var StaticBlock = class extends BlockStatement {
241
+ let StaticBlock = (() => {
242
+ let _classDecorators = [Deserializer('StaticBlock')];
243
+ let _classDescriptor;
244
+ let _classExtraInitializers = [];
245
+ let _classThis;
246
+ let _classSuper = BlockStatement;
247
+ var StaticBlock = class extends _classSuper {
248
+ static { _classThis = this; }
232
249
  static {
233
- __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name }, null, _classExtraInitializers_3);
234
- StaticBlock = _classThis_3 = _classDescriptor_3.value;
235
- __runInitializers(_classThis_3, _classExtraInitializers_3);
250
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
251
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
252
+ StaticBlock = _classThis = _classDescriptor.value;
253
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
254
+ __runInitializers(_classThis, _classExtraInitializers);
236
255
  }
237
256
  static fromJSON(node, deserializer) {
238
257
  return new StaticBlock(deserializer(node.body), node.range, node.loc);
@@ -249,8 +268,9 @@ export let StaticBlock = (() => {
249
268
  };
250
269
  }
251
270
  };
252
- return StaticBlock = _classThis_3;
271
+ return StaticBlock = _classThis;
253
272
  })();
273
+ export { StaticBlock };
254
274
  export class AbstractDefinition extends AbstractExpressionNode {
255
275
  key;
256
276
  decorators;
@@ -306,16 +326,20 @@ export class AbstractDefinition extends AbstractExpressionNode {
306
326
  /**
307
327
  * - When key is a PrivateIdentifier, computed must be false and kind can not be "constructor".
308
328
  */
309
- export let MethodDefinition = (() => {
310
- let _classDecorators_4 = [Deserializer('MethodDefinition')];
311
- let _classDescriptor_4;
312
- let _classExtraInitializers_4 = [];
313
- let _classThis_4;
314
- var MethodDefinition = class extends AbstractDefinition {
329
+ let MethodDefinition = (() => {
330
+ let _classDecorators = [Deserializer('MethodDefinition')];
331
+ let _classDescriptor;
332
+ let _classExtraInitializers = [];
333
+ let _classThis;
334
+ let _classSuper = AbstractDefinition;
335
+ var MethodDefinition = class extends _classSuper {
336
+ static { _classThis = this; }
315
337
  static {
316
- __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name }, null, _classExtraInitializers_4);
317
- MethodDefinition = _classThis_4 = _classDescriptor_4.value;
318
- __runInitializers(_classThis_4, _classExtraInitializers_4);
338
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
339
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
340
+ MethodDefinition = _classThis = _classDescriptor.value;
341
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
342
+ __runInitializers(_classThis, _classExtraInitializers);
319
343
  }
320
344
  kind;
321
345
  static fromJSON(node, deserializer) {
@@ -453,21 +477,26 @@ export let MethodDefinition = (() => {
453
477
  };
454
478
  }
455
479
  };
456
- return MethodDefinition = _classThis_4;
480
+ return MethodDefinition = _classThis;
457
481
  })();
482
+ export { MethodDefinition };
458
483
  /**
459
484
  * - When key is a PrivateIdentifier, computed must be false.
460
485
  */
461
- export let PropertyDefinition = (() => {
462
- let _classDecorators_5 = [Deserializer('PropertyDefinition')];
463
- let _classDescriptor_5;
464
- let _classExtraInitializers_5 = [];
465
- let _classThis_5;
466
- var PropertyDefinition = class extends AbstractDefinition {
486
+ let PropertyDefinition = (() => {
487
+ let _classDecorators = [Deserializer('PropertyDefinition')];
488
+ let _classDescriptor;
489
+ let _classExtraInitializers = [];
490
+ let _classThis;
491
+ let _classSuper = AbstractDefinition;
492
+ var PropertyDefinition = class extends _classSuper {
493
+ static { _classThis = this; }
467
494
  static {
468
- __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name }, null, _classExtraInitializers_5);
469
- PropertyDefinition = _classThis_5 = _classDescriptor_5.value;
470
- __runInitializers(_classThis_5, _classExtraInitializers_5);
495
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
496
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
497
+ PropertyDefinition = _classThis = _classDescriptor.value;
498
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
499
+ __runInitializers(_classThis, _classExtraInitializers);
471
500
  }
472
501
  static fromJSON(node, deserializer) {
473
502
  return new PropertyDefinition(deserializer(node.key), node.decorators.map(deserializer), node.computed, node.static, node.value && deserializer(node.value), node.range, node.loc);
@@ -509,18 +538,23 @@ export let PropertyDefinition = (() => {
509
538
  };
510
539
  }
511
540
  };
512
- return PropertyDefinition = _classThis_5;
541
+ return PropertyDefinition = _classThis;
513
542
  })();
514
- export let AccessorProperty = (() => {
515
- let _classDecorators_6 = [Deserializer('AccessorProperty')];
516
- let _classDescriptor_6;
517
- let _classExtraInitializers_6 = [];
518
- let _classThis_6;
519
- var AccessorProperty = class extends AbstractDefinition {
543
+ export { PropertyDefinition };
544
+ let AccessorProperty = (() => {
545
+ let _classDecorators = [Deserializer('AccessorProperty')];
546
+ let _classDescriptor;
547
+ let _classExtraInitializers = [];
548
+ let _classThis;
549
+ let _classSuper = AbstractDefinition;
550
+ var AccessorProperty = class extends _classSuper {
551
+ static { _classThis = this; }
520
552
  static {
521
- __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name }, null, _classExtraInitializers_6);
522
- AccessorProperty = _classThis_6 = _classDescriptor_6.value;
523
- __runInitializers(_classThis_6, _classExtraInitializers_6);
553
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
554
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
555
+ AccessorProperty = _classThis = _classDescriptor.value;
556
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
557
+ __runInitializers(_classThis, _classExtraInitializers);
524
558
  }
525
559
  static fromJSON(node, deserializer) {
526
560
  return new AccessorProperty(deserializer(node.key), node.decorators.map(deserializer), node.computed, node.static, node.value ? deserializer(node.value) : void 0, node.range, node.loc);
@@ -571,18 +605,23 @@ export let AccessorProperty = (() => {
571
605
  };
572
606
  }
573
607
  };
574
- return AccessorProperty = _classThis_6;
608
+ return AccessorProperty = _classThis;
575
609
  })();
576
- export let ClassBody = (() => {
577
- let _classDecorators_7 = [Deserializer('ClassBody')];
578
- let _classDescriptor_7;
579
- let _classExtraInitializers_7 = [];
580
- let _classThis_7;
581
- var ClassBody = class extends AbstractExpressionNode {
610
+ export { AccessorProperty };
611
+ let ClassBody = (() => {
612
+ let _classDecorators = [Deserializer('ClassBody')];
613
+ let _classDescriptor;
614
+ let _classExtraInitializers = [];
615
+ let _classThis;
616
+ let _classSuper = AbstractExpressionNode;
617
+ var ClassBody = class extends _classSuper {
618
+ static { _classThis = this; }
582
619
  static {
583
- __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name }, null, _classExtraInitializers_7);
584
- ClassBody = _classThis_7 = _classDescriptor_7.value;
585
- __runInitializers(_classThis_7, _classExtraInitializers_7);
620
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
621
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
622
+ ClassBody = _classThis = _classDescriptor.value;
623
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
624
+ __runInitializers(_classThis, _classExtraInitializers);
586
625
  }
587
626
  body;
588
627
  static fromJSON(node, deserializer) {
@@ -619,8 +658,9 @@ export let ClassBody = (() => {
619
658
  };
620
659
  }
621
660
  };
622
- return ClassBody = _classThis_7;
661
+ return ClassBody = _classThis;
623
662
  })();
663
+ export { ClassBody };
624
664
  export class Class extends AbstractExpressionNode {
625
665
  body;
626
666
  decorators;
@@ -706,16 +746,20 @@ export class Class extends AbstractExpressionNode {
706
746
  };
707
747
  }
708
748
  }
709
- export let ClassDeclaration = (() => {
710
- let _classDecorators_8 = [Deserializer('ClassDeclaration')];
711
- let _classDescriptor_8;
712
- let _classExtraInitializers_8 = [];
713
- let _classThis_8;
714
- var ClassDeclaration = class extends Class {
749
+ let ClassDeclaration = (() => {
750
+ let _classDecorators = [Deserializer('ClassDeclaration')];
751
+ let _classDescriptor;
752
+ let _classExtraInitializers = [];
753
+ let _classThis;
754
+ let _classSuper = Class;
755
+ var ClassDeclaration = class extends _classSuper {
756
+ static { _classThis = this; }
715
757
  static {
716
- __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name }, null, _classExtraInitializers_8);
717
- ClassDeclaration = _classThis_8 = _classDescriptor_8.value;
718
- __runInitializers(_classThis_8, _classExtraInitializers_8);
758
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
759
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
760
+ ClassDeclaration = _classThis = _classDescriptor.value;
761
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
762
+ __runInitializers(_classThis, _classExtraInitializers);
719
763
  }
720
764
  static fromJSON(node, deserializer) {
721
765
  return new ClassDeclaration(deserializer(node.body), node.decorators.map(deserializer), deserializer(node.id), node.superClass && deserializer(node.superClass), node.range, node.loc);
@@ -741,18 +785,23 @@ export let ClassDeclaration = (() => {
741
785
  return classConstructor;
742
786
  }
743
787
  };
744
- return ClassDeclaration = _classThis_8;
788
+ return ClassDeclaration = _classThis;
745
789
  })();
746
- export let ClassExpression = (() => {
747
- let _classDecorators_9 = [Deserializer('ClassExpression')];
748
- let _classDescriptor_9;
749
- let _classExtraInitializers_9 = [];
750
- let _classThis_9;
751
- var ClassExpression = class extends Class {
790
+ export { ClassDeclaration };
791
+ let ClassExpression = (() => {
792
+ let _classDecorators = [Deserializer('ClassExpression')];
793
+ let _classDescriptor;
794
+ let _classExtraInitializers = [];
795
+ let _classThis;
796
+ let _classSuper = Class;
797
+ var ClassExpression = class extends _classSuper {
798
+ static { _classThis = this; }
752
799
  static {
753
- __esDecorate(null, _classDescriptor_9 = { value: this }, _classDecorators_9, { kind: "class", name: this.name }, null, _classExtraInitializers_9);
754
- ClassExpression = _classThis_9 = _classDescriptor_9.value;
755
- __runInitializers(_classThis_9, _classExtraInitializers_9);
800
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
801
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
802
+ ClassExpression = _classThis = _classDescriptor.value;
803
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
804
+ __runInitializers(_classThis, _classExtraInitializers);
756
805
  }
757
806
  static fromJSON(node, deserializer) {
758
807
  return new ClassExpression(deserializer(node.body), node.decorators.map(deserializer), node.id && deserializer(node.id), node.superClass && deserializer(node.superClass), node.range, node.loc);
@@ -767,6 +816,7 @@ export let ClassExpression = (() => {
767
816
  super(body, decorators, id, superClass, range, loc);
768
817
  }
769
818
  };
770
- return ClassExpression = _classThis_9;
819
+ return ClassExpression = _classThis;
771
820
  })();
821
+ export { ClassExpression };
772
822
  //# sourceMappingURL=class.js.map