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
If we declare a new-able type, that is a mixin with the generic parameter it uses, the whole type is not processed.
For example, doing this, won't work
// In types.d.tsnamespacetest.ts.bug{varMyType: {new<T>(): T&{additional: "somevalue"};}}
// Then, in VS code, we make use of the type as such/** @extends {test.ts.bug.MyType<{tsc: "cool"|"sweet"}>} */classSomeClassextendsObject{}constmyVar=newSomeClass()
Suppose you try to use myVar, you won't see the any of the properties corrected listed, and auto-completed.
However, if you declared it like this
// In types.d.tsnamespacetest.ts.working{varMyType: {new<T>(): {additional: "somevalue";main: T};}}
And obviously, did the following in js
// Then, in VS code, we make use of the type as such/** @extends {test.ts.working.MyType<{tsc: "cool"|"sweet"}>} */classSomeClassextendsObject{}constmyVar=newSomeClass()
then with const myVar = new SomeClass(), the properties additional, and main.tsc are auto-completed very well.
Bug Report
If we declare a new-able type, that is a mixin with the generic parameter it uses, the whole type is not processed.
For example, doing this, won't work
Suppose you try to use
myVar
, you won't see the any of the properties corrected listed, and auto-completed.However, if you declared it like this
And obviously, did the following in js
then with
const myVar = new SomeClass()
, the propertiesadditional
, andmain.tsc
are auto-completed very well.🔎 Search Terms
mixins new-able newable types
🕗 Version & Regression Information
Same version with vs code
⏯ Playground Link
Playground link with relevant code
🙁 Actual behavior
const myVar = new SomeClass()
doesn't auto-complete in VS code🙂 Expected behavior
const myVar = new SomeClass()
is supposed to have thetsc
, andadditional
set to trueThe text was updated successfully, but these errors were encountered: