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

Webstorm - Typescript error on the able pipe #14

Open
twmobius opened this issue May 13, 2021 · 4 comments
Open

Webstorm - Typescript error on the able pipe #14

twmobius opened this issue May 13, 2021 · 4 comments

Comments

@twmobius
Copy link

Hi there,

first off, thanks for casl, it's a great library. I've noticed that WebStorm 2020.2 complains on the able pipe even on the angular-todo example app.

Screenshot 2021-05-13 at 12 55 02 PM

The application compiles properly, but there seems to be an issue with the typescript checking on the IDE. I would be very much obliged if you could look into it

@stalniy
Copy link
Owner

stalniy commented May 13, 2021

The issue is that I do t use Webstorm) very likely it’s somehow related to language service. Do you have some plugin for Angular?
But I can check in vscode though

@twmobius
Copy link
Author

WebStorm comes with Angular plugin bundled. I haven't installed anything that could interfere with typescript and or angular definitions.

I will check it with the latest WebStorm version to see if the problem still exists and get back to you

@twmobius
Copy link
Author

Yes I can confirm that the same error occurs on WebStorm 2021.1.1 (latest release). I am pretty sure this has something to do with the way the typescript definition for the pipe is being generated.

@fredjammes
Copy link

Same here with WebStorm 2021.2.2.
I tried to understand the type of the pipe transform args but I never saw this syntax :
transform(...args: Parameters<T['can']>): boolean;
Does it means it is parameters of the generic type T which contains a property called can ?

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

3 participants