add declare to class properties type annotations (#12257)

* add declare to class properties type annotations

* chore: use preset-flow
This commit is contained in:
Huáng Jùnliàng
2020-10-27 10:05:01 -04:00
committed by GitHub
parent 9eb661b285
commit ea2892fefc
14 changed files with 70 additions and 94 deletions

View File

@@ -102,14 +102,11 @@ module.exports = function (api) {
]
.filter(Boolean)
.map(normalize),
presets: [["@babel/env", envOpts]],
presets: [
["@babel/env", envOpts],
["@babel/preset-flow", { allowDeclareFields: true }],
],
plugins: [
// TODO: Use @babel/preset-flow when
// https://github.com/babel/babel/issues/7233 is fixed
[
"@babel/plugin-transform-flow-strip-types",
{ allowDeclareFields: true },
],
[
"@babel/proposal-object-rest-spread",
{ useBuiltIns: true, loose: true },