Skip to content

Commit

Permalink
fix: don't remove decorated definite class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescdavis committed Feb 11, 2020
1 parent d63c680 commit af70f4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/babel-plugin-transform-typescript/src/index.js
Expand Up @@ -74,7 +74,11 @@ export default declare(
);
}

path.remove();
if (node.definite && node.decorators) {
node.definite = null;
} else {
path.remove();
}
} else if (!allowDeclareFields && !node.value && !node.decorators) {
path.remove();
}
Expand Down

0 comments on commit af70f4b

Please sign in to comment.