Skip to content

Commit

Permalink
Add test with decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Mar 12, 2024
1 parent 8c866bc commit 89f8549
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
@@ -0,0 +1,7 @@
@dec1
class A {
@dec2 [notSymbol()] = 1;
@dec3 [Symbol.for("foo")] = 2;
@dec4 [Symbol.iterator] = 3;
@dec5 [notSymbolAgain()] = 4;
}
@@ -0,0 +1,21 @@
let _initClass, _classDecs, _computedKeyDecs, _computedKey, _init_computedKey, _init_extra_computedKey, _computedKeyDecs2, _init_computedKey2, _init_extra_computedKey2, _computedKeyDecs3, _init_computedKey3, _init_extra_computedKey3, _computedKeyDecs4, _computedKey2, _init_computedKey4, _init_extra_computedKey4;
_classDecs = [dec1];
let _A;
class A {
static {
({
e: [_init_computedKey, _init_extra_computedKey, _init_computedKey2, _init_extra_computedKey2, _init_computedKey3, _init_extra_computedKey3, _init_computedKey4, _init_extra_computedKey4],
c: [_A, _initClass]
} = babelHelpers.applyDecs2311(this, _classDecs, [[_computedKeyDecs, 0, _computedKey], [_computedKeyDecs2, 0, Symbol.for("foo")], [_computedKeyDecs3, 0, Symbol.iterator], [_computedKeyDecs4, 0, _computedKey2]]));
}
constructor() {
_init_extra_computedKey4(this);
}
[(_computedKeyDecs = dec2, _computedKey = babelHelpers.toPropertyKey(notSymbol()))] = _init_computedKey(this, 1);
[(_computedKeyDecs2 = dec3, Symbol.for("foo"))] = (_init_extra_computedKey(this), _init_computedKey2(this, 2));
[(_computedKeyDecs3 = dec4, Symbol.iterator)] = (_init_extra_computedKey2(this), _init_computedKey3(this, 3));
[(_computedKeyDecs4 = dec5, _computedKey2 = babelHelpers.toPropertyKey(notSymbolAgain()))] = (_init_extra_computedKey3(this), _init_computedKey4(this, 4));
static {
_initClass();
}
}

0 comments on commit 89f8549

Please sign in to comment.