Skip to content

Commit

Permalink
Remove unnecessary object accesses for legibility (#14446)
Browse files Browse the repository at this point in the history
  • Loading branch information
conartist6 committed Apr 10, 2022
1 parent 3f1bd8e commit b35ff0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/babel-plugin-syntax-typescript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ export default declare((api, { isTSX, disallowAmbiguousJSXLike }) => {
// in TS depends on the extensions, and is purely dependent on 'isTSX'.
removePlugin(plugins, "jsx");

parserOpts.plugins.push(
plugins.push(
["typescript", { disallowAmbiguousJSXLike }],
"classProperties",
);

if (!process.env.BABEL_8_BREAKING) {
// This is enabled by default since @babel/parser 7.1.5
parserOpts.plugins.push("objectRestSpread");
plugins.push("objectRestSpread");
}

if (isTSX) {
parserOpts.plugins.push("jsx");
plugins.push("jsx");
}
},
};
Expand Down

0 comments on commit b35ff0f

Please sign in to comment.