Skip to content

Commit

Permalink
improve type
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Feb 19, 2023
1 parent 2a8d361 commit def21f6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/babel-standalone/src/preset-stage-3.ts
Expand Up @@ -8,8 +8,7 @@ export default (_: any, opts: any = {}) => {
decoratorsBeforeExport,
} = opts;

// todo(flow->ts) improve types
const plugins: any[] = [
const plugins = [
babelPlugins.syntaxImportAssertions,
babelPlugins.proposalUnicodeSetsRegex,
babelPlugins.proposalDuplicateNamedCapturingGroupsRegex,
Expand All @@ -21,11 +20,8 @@ export default (_: any, opts: any = {}) => {
},
],
babelPlugins.proposalRegexpModifiers,
];

if (!process.env.BABEL_8_BREAKING) {
// These are Stage 4
plugins.push(
...(!process.env.BABEL_8_BREAKING && [
babelPlugins.proposalExportNamespaceFrom,
babelPlugins.proposalLogicalAssignmentOperators,
[babelPlugins.proposalOptionalChaining, { loose }],
Expand All @@ -36,8 +32,8 @@ export default (_: any, opts: any = {}) => {
[babelPlugins.proposalPrivateMethods, { loose }],
babelPlugins.proposalPrivatePropertyInObject,
babelPlugins.proposalClassStaticBlock,
);
}
]),
];

return { plugins };
};

0 comments on commit def21f6

Please sign in to comment.