Skip to content

"allowJs": true leads to error in decorators "error TS1240: Unable to resolve signature of property decorator when called as an expression." #401

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

Closed
pqr opened this issue Dec 5, 2016 · 4 comments

Comments

@pqr
Copy link

pqr commented Dec 5, 2016

TypeScript 2.0.10
ts-loader 1.2.2
Webpack 1.13.2

When using decorators from https://github.com/mobxjs/serializr library I see error "error TS1240: Unable to resolve signature of property decorator when called as an expression."

manual run tsc also works fine.

Regression introduced in v0.9.3
0.9.2 works fine!

I created minial repository to show the error: https://github.com/pqr/ts-loader-issue-401

@johnnyreilly
Copy link
Member

Possibly related to #388

Could you try the amend suggested there and see if that resolves your issue as well?

@pqr
Copy link
Author

pqr commented Dec 5, 2016

@johnnyreilly I changed that line to const scriptRegex = /\.tsx?$/i; and now it compiles without the error!

@johnnyreilly
Copy link
Member

Thanks! - I'll be doing something about this. Just need to work out a plan of action. Watch this space

@johnnyreilly
Copy link
Member

johnnyreilly commented Dec 5, 2016

Should be resolved with 1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants