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

Controller store methods are not properly matched when using typescript in VS Code #1000

Open
igor-pejakovic-codaxy opened this issue Aug 19, 2022 · 2 comments

Comments

@igor-pejakovic-codaxy
Copy link
Contributor

When using a typescript controller and using the this.store methods, the methods with signatures (any, any) are recommended first in vscode. The simplest solution would probably be to have these declared as last definitions. This does not happen with the store.get method since it does not have any definitions where the parameters are of type any

@mstijak
Copy link
Member

mstijak commented Aug 22, 2022

Would you be interested in making a PR?

If by store.get you mean a store in a callback method, you should be able to type that too.

void onItemClick(e: MouseEvent, { store }: Instance<PageModel & Record>) {
  //store.get() should be typed here  
}

@mstijak
Copy link
Member

mstijak commented Oct 4, 2022

This should be solved in the latest version. Please check before we close this issue.

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