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

Super As Any #185

Open
Calidus opened this issue Nov 7, 2022 · 0 comments
Open

Super As Any #185

Calidus opened this issue Nov 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Calidus
Copy link
Contributor

Calidus commented Nov 7, 2022

It seems that the As Any plugin doesn't recognize the super keyword and wraps it in a as any.

super.DoStuff()

becomes

(super as any).DoStuff()

typescript 4.8.4
ts-migrate 0.1.34

Edit:

This seems to work correctly with simple situations where both classes are in the same file.

class  bar {
  doStuff() {
  }
}
class foo extends bar {
  doStuff() {
    super.DoStuff()
  }
}

My currently hypothesis is that its a issue when you have classes in different files.

@Rudeg Rudeg added the bug Something isn't working label Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants