Socket
Socket
Sign inDemoInstall

babel-plugin-transform-typescript-metadata

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

13

CHANGELOG.md

@@ -0,1 +1,14 @@

## [0.2.1](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/compare/v0.2.0...v0.2.1) (2019-03-24)
### 📚 Documentation
* Add current pitfalls to README ([2f2b888](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/2f2b888))
### 🏗 Chore
* Add package.json keywords ([97690ca](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/97690ca))
# [0.2.0](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/compare/v0.1.1...v0.2.0) (2019-03-24)

@@ -2,0 +15,0 @@

9

package.json
{
"name": "babel-plugin-transform-typescript-metadata",
"version": "0.2.0",
"version": "0.2.1",
"description": "Babel plugin to emit decorator metadata like typescript compiler",

@@ -12,2 +12,9 @@ "main": "lib/plugin.js",

],
"keywords": [
"babel",
"babel-plugin",
"babel-typescript",
"decorators",
"reflect-metadata"
],
"scripts": {

@@ -14,0 +21,0 @@ "dev": "babel src -w -d lib -x '.ts,.tsx'",

@@ -107,1 +107,19 @@ # babel-plugin-transform-typescript-metadata

```
## Current Pitfalls
- We cannot know if type annotations are just types (i.e. `IMyInterface`) or
concrete values (like classes, etc.). In order to resolve this, we emit the
following: `typeof Type === 'undefined' ? Object : Type`. The code has the
advantage of not throwing If you know a better
way to do this, let me know!
- Parameter decorators are emitted right _after_ the `ClassDeclaration` node,
like:
```js
let A = (/* ... */)
Inject()(A.prototype, 'methodName', 1);
```
I'm not sure if this can cause issue with scoping, if you get in troubles with
this kind of decorators, please open an issue.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc