Skip to content

Commit 1b84269

Browse files
committed
fix: add decoratorsBeforeExport options for decorators
1 parent f196cf2 commit 1b84269

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ npm i -D babel-preset-proposal-typescript
5050

5151
## Options
5252

53-
| option | description | defaults |
54-
| ------------------ | ------------------------------------------------------------------ | ------------------------------------- |
55-
| `classLoose` | whether to use loose mode for class properties and private methods | `true` |
56-
| `decoratorsLegacy` | whether to use legacy decorators semantic | `true` |
57-
| `isTSX` | whether to enable `jsx` plugin with `typescript` | `false`, `true` but for `/\.[jt]sx$/` |
58-
| `pipelineOperator` | implementation of pipeline operator | `"minimal"` |
53+
| option | description | defaults |
54+
| ------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------- |
55+
| `classLoose` | whether to use loose mode for class properties and private methods | `true` |
56+
| `decoratorsBeforeExport` | See [Babel Document](https://babeljs.io/docs/en/babel-plugin-proposal-decorators#decoratorsbeforeexport) | N/A |
57+
| `decoratorsLegacy` | whether to use legacy decorators semantic | `true` |
58+
| `isTSX` | whether to enable `jsx` plugin with `typescript` | `false`, `true` but for `/\.[jt]sx$/` |
59+
| `pipelineOperator` | implementation of pipeline operator | `"minimal"` |
5960

6061
## Usage
6162

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-preset-proposal-typescript",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"description": "Yet another Babel preset for TypeScript, only transforms proposals which TypeScript does not support now.",
55
"repository": "[email protected]/rx-ts/babel-preset-proposal-typescript.git",
66
"author": "JounQin <[email protected]>",

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default declare((api, opts) => {
2222

2323
const {
2424
classLoose = true,
25+
decoratorsBeforeExport,
2526
decoratorsLegacy = true,
2627
isTSX,
2728
pipelineOperator = 'minimal',
@@ -32,6 +33,7 @@ export default declare((api, opts) => {
3233
[
3334
syntaxDecorators,
3435
{
36+
decoratorsBeforeExport,
3537
legacy: decoratorsLegacy,
3638
},
3739
],

0 commit comments

Comments
 (0)