Ryan Cavanaugh
Ryan Cavanaugh
We're still writing up the exact guidelines on suggestions, but basically "Needs Proposal" means that we're looking for someone to write up a detailed formal explanation of what the suggestion...
> You could also use it to make a type nominal in a specific context What would that mean?
An example of an error (or _non_-error) would be nice. I can't figure out how you'd even use this thing ``` ts interface CustomerId { name: string } interface OrderId...
> I don't know why is there, I don't know what the focus function is > I don't know why it's so complicated, really. What is on window and what...
The simplest form looks like this: ```ts type Thing = | { op: 'a', a: T } | { op: 'c' | 'd', cd: T }; function test(value: Thing): void...
The TL;DR is that from the control flow analyzer's perspective, the code looks like this ```ts type Thing = | { op: 'a', a: T } | { op: 'c'...
This analysis is done structurually and `A` is a subtype of `Readonly`, so knowing that `obj` isn't an `A` doesn't tell you that it's a `B`. By analogy, if have...
> Interesting in my head it was the other way around that Readonly would be subtype of A This is definitely one of those things that feels true but isn't
This is pretty unlikely to happen, since you can already write: ```ts type Satisfies = T; type Test = Satisfies; ``` or ```ts type Satisfies = T; type Test =...
I'd be interested to see the PR. A couple testcases I'd like to see, along with discussion of how they're handled: ```ts declare function fn(arg: T, cb: (n: T) =>...