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 I change constructor(value: T) { } to constructor(value: string) { } it fails. It should fail anyhow, since T could NEVER be of the expected type. :/
This also just seems wrong:
interface IType<TInstance> {
new (value: boolean, ...args: any[]): TInstance;
}
class Test<T extends Object> {
constructor(value: T) { }
}
function doSomething(_type: IType<any>) { }
doSomething(Test);
class O extends Object { }
class TO extends Test<O> { }
doSomething(TO);
Compiles just fine. :/
The text was updated successfully, but these errors were encountered:
Not sure if I found a bug or not, so just checking first. The code below should not work, but it compiles fine:
(here)
If I change
constructor(value: T) { }
toconstructor(value: string) { }
it fails. It should fail anyhow, since T could NEVER be of the expected type. :/This also just seems wrong:
Compiles just fine. :/
The text was updated successfully, but these errors were encountered: