babel-plugin-transform-typescript-metadata
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -0,1 +1,19 @@ | ||
## [0.3.2](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/compare/v0.3.1...v0.3.2) (2021-03-19) | ||
### 🛠 Improvements | ||
* Fixed up return type to include objectpattern type ([368eb09](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/368eb09)) | ||
### 📚 Documentation | ||
* Add documentation about webpack complains ([a397113](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/a397113)) | ||
### 🏗 Chore | ||
* Added test for object spread argument ([d6ec125](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/d6ec125)) | ||
* Fixed missing call to ObjectSpread decorator ([ee28b83](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/ee28b83)) | ||
## [0.3.1](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/compare/v0.3.0...v0.3.1) (2020-10-12) | ||
@@ -2,0 +20,0 @@ |
@@ -27,2 +27,3 @@ "use strict"; | ||
if (param.type === 'Identifier') return param; | ||
if (param.type === 'ObjectPattern') return param; | ||
if (param.type === 'AssignmentPattern' && param.left.type === 'Identifier') return param.left; | ||
@@ -29,0 +30,0 @@ if (param.type === 'TSParameterProperty') return getTypedNode(param.parameter); |
@@ -39,3 +39,3 @@ "use strict"; | ||
params.slice().forEach(function (param) { | ||
let identifier = param.node.type === 'Identifier' ? param.node : param.node.type === 'TSParameterProperty' && param.node.parameter.type === 'Identifier' ? param.node.parameter : null; | ||
let identifier = param.node.type === 'Identifier' || param.node.type === 'ObjectPattern' ? param.node : param.node.type === 'TSParameterProperty' && param.node.parameter.type === 'Identifier' ? param.node.parameter : null; | ||
if (identifier == null) return; | ||
@@ -42,0 +42,0 @@ let resultantDecorator; |
{ | ||
"name": "babel-plugin-transform-typescript-metadata", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Babel plugin to emit decorator metadata like typescript compiler", | ||
@@ -5,0 +5,0 @@ "main": "lib/plugin.js", |
@@ -142,2 +142,7 @@ # babel-plugin-transform-typescript-metadata | ||
- If you are using webpack and it complains about missing exports due to types | ||
not being removed, you can switch from `import { MyType } from ...` to | ||
`import type { MyType } from ...`. See [#46](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/issues/46) for details and | ||
examples. | ||
- We cannot know if type annotations are just types (i.e. `IMyInterface`) or | ||
@@ -144,0 +149,0 @@ concrete values (like classes, etc.). In order to resolve this, we emit the |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30165
335
151