Skip to content
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

[inversify-express-utils] Method decorator does not work outside of ES5/ES2015 #444

Open
Jameskmonger opened this issue Nov 15, 2018 · 0 comments

Comments

@Jameskmonger
Copy link
Contributor

Issue

When using the httpGet, httpPost etc method decorators, I get the following error:

Unable to resolve signature of method decorator when called as an expression.

Workaround

To work around this, set target in tsconfig.json to "es5" or "es2015"

Solution

We encountered a similar issue in alsatian, the fix was to change the types on a method decorator.

I believe the fix here would be to change the signature of HandlerDecorator to:

(target: object, key: string, value?: any): void;

I have made that change locally and it works.

Your Environment

@notaphplover notaphplover transferred this issue from inversify/InversifyJS Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant