Closed
Description
TypeScript Version: 2.3.2 (or whatever is running in the playground, something similar is reproduced locally of course.)
Code
class Foo{
something: boolean;
something2: boolean;
}
class MyClass<T extends Foo>{
func(x): Partial<T>{
return {
something: true
}
}
}
Expected behavior:
The code is valid and the TS compiler recognizes that T in the context of MyClass can have a 'something' field.
Actual behavior:
The code does not compile. The error is: "Type '{ something: true; }' is not assignable to type 'Partial'."