eclipse-typescript icon indicating copy to clipboard operation
eclipse-typescript copied to clipboard

Add support for emitDecoratorMetadata compiler option

Open svenloe opened this issue 9 years ago • 3 comments

I try to use the plugin for angular 2. I would like to set moduleResolution, emitDecoratorMetadata, experimentalDecorators. Is there some possibility to set these? Is it possible for extend the plugin to support the params. Where could I start?

svenloe avatar Mar 02 '16 20:03 svenloe

Looks like experimentalDecorators and moduleResolution are already supported (its in the project settings for a TypeScript-enabled project). The emitDecoratorMetadata support is missing. If you are interested in contributing this back, check out https://github.com/palantir/eclipse-typescript/commit/5caabc641eef9bf0b8310b392e1364deaabd1770 for an example of hooking up a compiler option.

derekcicerone-zz avatar Mar 02 '16 22:03 derekcicerone-zz

Apparently, this little compiler option is a pretty big deal in the world of Angular2 and Dependency Injection (@Injectable). After two days of banging my head against the wall and wondering why DI was throwing exceptions (TypeError: Cannot read property 'query' of null in RC2 and Can't resolve all parameters for ...: (?, ?) in RC4 ), I came across this open issue.

Anyway, I could definitely use this option in the future, however, it appears this coincides a bit with Issue #268 and is currently being addressed with PR #323, so having tsconfig support would be an amazing short term "workaround" for me!

JustinCIS avatar Jul 13 '16 04:07 JustinCIS

Thanks @JustinCIS, #323 PR should be checked by the end of the week.

I added emitDecoratorMetadata option in this commit: 3762c20

lgrignon avatar Jul 13 '16 06:07 lgrignon