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 7b6ffc3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
@@ -0,0 +1,9 @@
let dec1, dec2, dec3;

@dec1
class A {
[notSymbol()] = 1;
@dec2 [Symbol.iterator] = 2;
[Symbol.for("foo")] = 3;
@dec3 [notSymbolAgain()] = 4;
}
@@ -0,0 +1,21 @@
let _initClass, _computedKey, _init_computedKey, _init_extra_computedKey, _computedKey2, _init_computedKey2, _init_extra_computedKey2;
let dec1, dec2, dec3;
let _A;
class A {
static {
({
e: [_init_computedKey, _init_extra_computedKey, _init_computedKey2, _init_extra_computedKey2],
c: [_A, _initClass]
} = babelHelpers.applyDecs2311(this, [dec1], [[dec2, 0, Symbol.iterator], [dec3, 0, _computedKey2]]));
}
constructor() {
_init_extra_computedKey2(this);
}
[_computedKey = notSymbol()] = 1;
[Symbol.iterator] = _init_computedKey(this, 2);
[Symbol.for("foo")] = (_init_extra_computedKey(this), 3);
[_computedKey2 = babelHelpers.toPropertyKey(notSymbolAgain())] = _init_computedKey2(this, 4);
static {
_initClass();
}
}

0 comments on commit 7b6ffc3

Please sign in to comment.