[hotfix] Use same targets for fields as for private methods (#11633)

This commit is contained in:
Nicolò Ribaudo 2020-05-27 22:43:23 +02:00 committed by GitHub
parent 05804b166c
commit 32bd530f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 1 deletions

View File

@ -19,4 +19,7 @@ for (const plugin of Object.keys(bugfixPlugins)) {
}
}
pluginsFiltered["proposal-class-properties"] =
pluginsFiltered["proposal-private-methods"];
export { pluginsFiltered as plugins, bugfixPluginsFiltered as pluginsBugfixes };

View File

@ -9,7 +9,7 @@ Using modules transform: auto
Using plugins:
syntax-numeric-separator { "chrome":"80" }
syntax-class-properties { "chrome":"80" }
proposal-class-properties { "chrome":"80" }
proposal-private-methods { "chrome":"80" }
syntax-nullish-coalescing-operator { "chrome":"80" }
syntax-optional-chaining { "chrome":"80" }

View File

@ -0,0 +1,3 @@
class A {
x;
}

View File

@ -0,0 +1,8 @@
{
"presets": [
["env", {
"targets": { "node": 12 },
"shippedProposals": true
}]
]
}

View File

@ -0,0 +1,8 @@
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class A {
constructor() {
_defineProperty(this, "x", void 0);
}
}