Skip to content

Commit

Permalink
breaking: enable allowNamespaces by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Feb 5, 2021
1 parent 74ed698 commit 09002f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/babel-plugin-transform-typescript/src/index.js
Expand Up @@ -53,13 +53,12 @@ export default declare((api, opts) => {
const {
jsxPragma = "React.createElement",
jsxPragmaFrag = "React.Fragment",
allowNamespaces = false,
onlyRemoveTypeImports = false,
} = opts;

if (!process.env.BABEL_8_BREAKING) {
// eslint-disable-next-line no-var
var { allowDeclareFields = false } = opts;
var { allowDeclareFields = false, allowNamespaces = false } = opts;
}

const classMemberVisitors = {
Expand Down Expand Up @@ -402,7 +401,7 @@ export default declare((api, opts) => {
},

TSModuleDeclaration(path) {
transpileNamespace(path, t, allowNamespaces);
transpileNamespace(path, t, !!allowNamespaces);
},

TSInterfaceDeclaration(path) {
Expand Down

0 comments on commit 09002f2

Please sign in to comment.