-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decorator issue for TSC Build #42
Comments
The issue is that you're transpiling with Therefore, you should choose Besides that, I found another issue. Since you're using "module": "NodeNext",
"moduleResolution": "NodeNext", in your If you don't like this and want to import modules without extensions, you should use a bundler like Here is a PR with the fixes. |
I added some instructions, please find them here: https://needle-di.io/getting-started.html#transpiler-settings. I will close this issue, feel free to reopen it if it's not clear if you have additional questions. |
Thank you for the explanation and effort into the PR, it makes complete sense now. Looks like the proposal in ecmascript could take a while longer so I'll keep running with tsc for now 👍🏻 ! |
No problem! Thanks for reporting! Yes, it took a long time (years) before the proposal even got into stage 3. I suspect it will take some more time before it will get to stage 4 and is being shipped in all the different runtimes/browsers, but implementation is currently already being worked on. In Deno it is already supported. |
When building with Typescript(v5.6.3) I get the following error upon trying to execute the built code.
I'm a bit unsure of the decorator support in typescript but I was hoping you might be able to shed some light. From the sounds of it if a DI/IoC lib is built with the new TS5 decorator support then
reflect-metadata
and the experimental tsconfig options are not needed?Absolutely love the simplicity and quality of this library. By far so far my favorite IoC lib in node atm if I can get builds to succeed.
Steps To Reproduce:
pnpm install
cd apps/api
pnpm build
pnpm start
The text was updated successfully, but these errors were encountered: