We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 Version: 2.0.10
{ "compilerOptions": { "module": "commonjs", "target": "es5", "strictNullChecks": true, "noImplicitAny": false, "sourceMap": false } }
Code
const mixed = [1, 'one', null, undefined]; const $ = Observable.of(...mixed) .filter(x => x !== null) .filter(x => x !== undefined) .filter(x => typeof x !== 'string'); $.subscribe(x => console.log(x)); // 1
Expected behavior: $ is in type (number)
Actual behavior: $ is in type (string | number | null | undefined)
The text was updated successfully, but these errors were encountered:
Related: #9998 (comment)
Sorry, something went wrong.
there is not a way to represent this transformation to the type system. an option would be something like #12424
@mhegazy Could you please explain a little bit more? I still can't get my head around after looking at #12424...
No branches or pull requests
TypeScript Version: 2.0.10
Code
Expected behavior:
$ is in type (number)
Actual behavior:
$ is in type (string | number | null | undefined)
The text was updated successfully, but these errors were encountered: