Ryan Cavanaugh
Ryan Cavanaugh
We can't make any guarantees like this in the presence of errors. I'm not against improving something but just in general it's not an invariant.
This is intentional; many rarely-used things (specifically from `Object`) are not shown by default
`hasOwnProperty`, `propertyIsEnumerable`, `isPrototypeOf` are also things you can access on any `Object`.
What I see in that thread is that people have differing definitions of "equal" that are possibly in conflict, e.g. https://github.com/microsoft/TypeScript/issues/27024#issuecomment-1044193168. If you want to reopen this please fill out...
``` { p: string | number; } should be considered equal to { p: string } | { p: number; } ``` 👀 These types are very much different; `T...
I would recommend turning off `noUncheckedIndexedAccess` if you're always confident that your accesses are in-bounds. It is [intentionally a blunt instrument](https://github.com/microsoft/TypeScript/pull/39560) and [we don't intend to add new kinds of...
@ahejlsberg was kicking an idea around a while back where all narrowing would be done via intersection like what you're proposing there, which would make this work more or less...
@copilot try again
Tests failed. Should try again, this might be a good fix
> Property 'SPADES' does not exist on type 'Suits' This would be the error you'd see if you wrote ```ts function fn(x: Suits) { console.log(x.SPADES); } ```