Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWanting to contribute for Metadata Reflection and Decorators Support in TypeScript package #10784
Comments
|
Here are my thoughts on the challenges of paying attention to |
|
@benjamn The actual issue is lack of these two additional options prevents users of Angular, Inversify and other kind of libraries to benefit from this |
|
@benjamn I have the feeling that only a very limited amount of tsconfig settings will impact meteor's build (stuff like module, targets, etc), and that not allowing users to specify the other flags will create a lot more problems than the confusion of having that small set forced by meteor. Couldn't we simply for the moment use a "best effort" approach to respect the tsconfig flags, and discard those that influence meteor's behaviour? |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
not stale |
|
Also we use |
|
@benjamn @filipenevola any news? It is a blocker for us to migrate from Adornis package to "native" typescript. There is open PR to meteor-babel meteor/babel#28 |
|
I am also blocked in migrating from Adornis to the typescript package until some flags in tsconfig.json are allowed: #10610 (comment) In short I need at least
to be allowed. I really really really hope they get supported. Edit: |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
no stale. I believe @ardatan gave a couple of possible solutions, can someone decide and offer one of them? |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
no stale. |
|
is there a workaround until we can use that by default? |
|
You can use barbatus:typescript package instead of official one. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
no stale. |
|
Hi @ardatan I've talked with @perbergland about his typescript package as well (https://github.com/ref-app/meteor-typescript) and we should join efforts here to update the official typescript package in the best way for the community. @zodern is also going to take a look in this package from Per to check if the performance could be improved. We need to select a package to be the candidate for the new official package and then make PRs to update the actual official package. Any thoughts on this? @hexsprite and @leonardoventurini feel free to share your opinions as well. |
|
@filipenevola I think it is fine. The most important point is to have enough flexibility to support user's tsconfig.json (at least decorators). |
When using
typescriptpackage in an Angular project, it doesn't have metadata reflection which Angular needs to have"experimentalDecorators": trueand"emitDecoratorMetadata": trueincompilerOptionsof TS Compiler configuration which is missing inmeteor-babel'spreCompileTypescript. So this little change inmeteor-babelwouldn't affect existing Meteor users but it would make Meteor support all those libraries using decorators and metadata reflection like Angular, TypeORM, TypeGraphQL, Inversify etc. I can create a PR for this issue if you want.https://github.com/meteor/babel/blob/51258a2feb412131ec045a7fba613690d9854ad0/index.js#L149
But I think respecting
tsconfig.jsonin the project would be better because there are some othercompilerOptions, users may want to use now and later. If you want to force users in some options, you can throw an error during compilation process to make users change by themselves instead of overriding it which would be more consistent with the behavior of the IDE that respectstsconfig.json.There is another option which is using
babel-typescript(or respectingbabelrcand addtsandtsxextensions toecmascriptpackagemeteor/packages/ecmascript/plugin.js
Line 2 in 3f88ccb
flowplugins to prevent conflicts insidemeteor-babelso there would be single compilation process handled in babel completely. And in this case not to break the existing behavior for flow users, we can removeflowplugin fortsfiles only inmeteor-babelpackage.What do you think? @benjamn