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
in
typeof foo.a === 'string'
{ a: unknown }
unknown
"a" in x
x
object
any
keyof this
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in
operator as type guard which asserts property existence #21732in
operator as type guardtypeof foo.a === 'string'
(which is not allowed){ a: unknown }
?unknown
here becase"a" in x
throws forx
undefined / null / number / etcobject
to avoid unexpected exceptionsin
as a type guard when property absence is a psuedo-discriminant, which introduces some inconsistency if we do bothin
narrowing worksany
s introduced causing problemskeyof this
means they're very reliant on bivarianceThe text was updated successfully, but these errors were encountered: