babel-plugin-typescript-decorators
v1.0.5
Published
Compatible typescript decorators (with parameter decorators).
Downloads
4,205
Maintainers
Readme
babel-plugin-typescript-decorators
Compatible typescript decorators (with parameter decorators).
Install
Using npm:
npm install --save-dev babel-plugin-typescript-decorators
or using yarn:
yarn add --dev babel-plugin-typescript-decorators
Usage
With a configuration file (Recommended)
{
"presets": [
["@babel/preset-typescript", { "onlyRemoveTypeImports": true }]
],
"plugins": ["babel-plugin-typescript-decorators"]
}
Via CLI
babel --plugins babel-plugin-typescript-decorators script.js
Via Node API
require("@babel/core").transformSync("code", {
plugins: ["babel-plugin-typescript-decorators"]"],
});
Thanks
Fork from @babel/plugin-proposal-decorators and inspired by babel-plugin-parameter-decorator