You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a small but annoying issue in the tsserver implementation (as far as I can tell) that's been around for a long time, I'm tracking from version 2.6.
Namely, there is a mapped-type pattern I want to use, as shown in code below, and the hover type definition doesn't infer multiple levels deep. However, interestingly, tsc does infer the type correctly.
TypeScript Version: 2.6+
Code
typeF<T>=(value: any)=>Tfunctionall<V>(vals: {[KinkeyofV]: F<V[K]>}): (value: any)=>V{returnnullasany;}// inspect the hover type of `x`// it should show const x: { a: { b: any }}constx=all({a: all({b: (value: any)=>3})})(3)// inspect the hover type of `b`// it should show (property) b: numberx.a.b;// and obviously this does not compilex.a.b='not-a-number';
Expected behavior:
The hover type definition (and it's variants) should show
There's a small but annoying issue in the
tsserver
implementation (as far as I can tell) that's been around for a long time, I'm tracking from version 2.6.Namely, there is a mapped-type pattern I want to use, as shown in code below, and the hover type definition doesn't infer multiple levels deep. However, interestingly,
tsc
does infer the type correctly.TypeScript Version: 2.6+
Code
Expected behavior:
The hover type definition (and it's variants) should show
Actual behavior:
The hover type definition for
x
isPlayground Link
Related Issues: Not that I found.
The text was updated successfully, but these errors were encountered: