-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Error typeof type guards #20613
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
Comments
I try the [email protected] => Not solve the issue. |
Are you sure you installed it successfully? I don't see an error at |
Yes : Version 2.7.0-dev.20171212
and here my temporary patch:
and the : interface ParsedUrlQuery { [key: string]: string | string[]; } |
I don't get a compile error in this example: interface ParsedUrlQuery { [key: string]: string | string[]; }
function test(params: ParsedUrlQuery): boolean {
return typeof params.birthday !== "string" || !Date.parse(params.birthday);
} Do you? If you do, what |
|
Using that exact |
Ok thanks. I will investigate. Maybe conflict with my TSlint. |
Ok confirm the Version 2.7.0-dev.20171212 solved the issue. I had a conflict between global and local package in the last test. Thanks for your job! |
Get an Typscript Error on !Date.parse(params.birthday) because params.birthday can be a string or string []
Possible to make also object typeof recognize it as a type guard ?
The text was updated successfully, but these errors were encountered: