-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Typescript this parameters don't work #236
Comments
I can't reproduce this. What is your swc version? |
I certify that the issue occurs when using the Please view this repository. It isolates the issue. |
I found the issue. export function DirectiveController(this, $scope, $attrs) {
this['$scope'] = $scope;
this['$attrs'] = $attrs;
} and webpack cannot understand this syntax. So I guess swc should remove this parameter. |
Yes, I see.
|
As this is a bug fix, I'll publish 1.0.21 soon. |
Fixed with |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
I'm trying to compile a function with this parameters. Part of my code is:
And I get the error:
Module parse failed: Unexpected keyword 'this' (1:52)
Here's my Webpack configuration for swc:
The code compiles successfully with Babel, but with swc, I have to remove the
this
parameter and add thenoImplicitThis: false
configuration to tsconfig for my IDE to ignore it.The text was updated successfully, but these errors were encountered: