Closed

Description
Bug Report
π Search Terms
generic partial
π Version & Regression Information
4.2.2
β― Playground Link
π» Code
type FunctionType<T> = {
func(arg: Partial<T>): any;
};
type StringType = {
str: string;
};
function example<T extends StringType>(ft: FunctionType<T>) {
ft.func({ str: "" });
}
π Actual behavior
The code doesn't compile because ft.func({ str: "" })
gives the following error
Argument of type '{ str: ""; }' is not assignable to parameter of type 'Partial<T>'.
π Expected behavior
I would expect the code to compile