You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you detail how that works? Currently if I try to remove my @injectable() decorators on my classes, I get these errors everywhere:
Error while synchronizing SKU "01932c80-1010-743d-92c5-06c8887b2107" with error Error: Found unexpected missing metadata on type "SomeClass" at constructor indexes "0".
Are you using @inject, @multiInject or @unmanaged decorators at those indexes?
If you're using typescript and want to rely on auto injection, set "emitDecoratorMetadata" compiler option to true
Steps to reproduce
No response
Expected behavior
I expected Inversify to still work without that decorator on the class.
Possible solution
No response
Package version
6.1.4
Node.js version
23.0.0
In which operating systems have you tested?
macOS
Windows
Linux
Stack trace
No response
Other
No response
The text was updated successfully, but these errors were encountered:
Hey @ffMathy, I have been investigating the issue. Tbh, it seems @injectable will continue being mandatory.
The issue
Currently, injectable decorator should not be required. Metadata readers are prepared to fetch tsc metadata from design:paramtypes.
Unfortunatelly, it seems design:paramtypes is only included in the class metadata if and only if there's at least one class decorator applied to the class.
Is there an existing issue for this?
Current behavior
In version 6.1.0, this release note was added:
Can you detail how that works? Currently if I try to remove my
@injectable()
decorators on my classes, I get these errors everywhere:Steps to reproduce
No response
Expected behavior
I expected Inversify to still work without that decorator on the class.
Possible solution
No response
Package version
6.1.4
Node.js version
23.0.0
In which operating systems have you tested?
Stack trace
No response
Other
No response
The text was updated successfully, but these errors were encountered: