Ryan Cavanaugh

Results 447 comments of Ryan Cavanaugh
trafficstars

Agreed in the VS Code sync to show both the constructor (as the first result) and the class definition (as the second result) when the constructor definition isn't a child...

This seems correct? Let's say you wrote this: ```ts interface Foo { type: 'foo'; optionalProp?: boolean; } type Consumer = (arg: T) => void; declare function someFunc(consumer: Consumer, defaultT: T):...

`TestEnvironment` as written just needs some help if the intended contract is that the `template` argument is the sole determinant of `Args`. This inference in both 5.5 and 5.6 doesn't...

> My concern is that large swaths of pre-existing TypeScript is just going to stop compiling correctly around the world in this version. If that's okay, then okay. The available...

There are definitely going to be multiple correct possible inferences when all sites for a type parameter are the nested in the same intersection, and a "smaller" inference for `P`...

This seems unambiguously correct, since this is a legal implementation of `match` with a legal call (and the resulting code crashes): ```ts export interface Context { currentData: T[]; sourceData: T;...

A useful observation is that this can be fixed by a single variance annotation ```ts interface Observable { ``` which implies we're likely measuring the variance wrong.

What's a repro that doesn't depend on an incorrect variance annotation?