-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[corejs3] Inject
esnext.symbol.metadata
for decorated classes (#179)
Co-authored-by: liuxingbaoyu <[email protected]>
- Loading branch information
1 parent
8999c65
commit 3416609
Showing
7 changed files
with
169 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/decorators/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class A { | ||
@dec foo = 2; | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/decorators/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"plugins": [ | ||
["@@/polyfill-corejs3", { "method": "usage-global", "version": "3.31.0", "proposals": true }], | ||
["@babel/plugin-proposal-decorators", { "version": "2023-05" }], | ||
["@babel/plugin-transform-runtime", { "version": "7.100.0" }] | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-global/decorators/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var _applyDecs = require("@babel/runtime-corejs3/helpers/applyDecs2305").default; | ||
var _dec, _init_foo; | ||
require("core-js/modules/esnext.function.metadata.js"); | ||
require("core-js/modules/esnext.symbol.metadata.js"); | ||
require("core-js/modules/es.string.iterator.js"); | ||
require("core-js/modules/es.array.iterator.js"); | ||
require("core-js/modules/web.dom-collections.iterator.js"); | ||
_dec = dec; | ||
class A { | ||
static { | ||
[_init_foo] = _applyDecs(this, [[_dec, 0, "foo"]], []).e; | ||
} | ||
foo = _init_foo(this, 2); | ||
} |
Oops, something went wrong.