Skip to content

Commit 2f2b888

Browse files
📚 Add current pitfalls to README
1 parent 97690ca commit 2f2b888

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,21 @@ With `.babelrc`:
104104
]
105105
}
106106
```
107+
108+
## Current Pitfalls
109+
110+
- We cannot know if type annotations are just types (i.e. `IMyInterface`) or
111+
concrete values (like classes, etc.). In order to resolve this, we emit the
112+
following: `typeof Type === 'undefined' ? Object : Type`. The code has the
113+
advantage of not throwing If you know a better
114+
way to do this, let me know!
115+
- Parameter decorators are emitted right _after_ the `ClassDeclaration` node,
116+
like:
117+
118+
```js
119+
let A = (/* ... */)
120+
Inject()(A.prototype, 'methodName', 1);
121+
```
122+
123+
I'm not sure if this can cause issue with scoping, if you get in troubles with
124+
this kind of decorators, please open an issue.

0 commit comments

Comments
 (0)