tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. Types of parameters 'onFulFill' and 'onFulfill' are incompatible. Type '(value: number) => any' is not assignable to type '(value: string) => any'. Types of parameters 'value' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/optionalFunctionArgAssignability.ts (1 errors) ==== interface Promise { then(onFulfill?: (value: T) => U, onReject?: (reason: any) => U): Promise; } var a = function then(onFulfill?: (value: string) => U, onReject?: (reason: any) => U): Promise { return null }; var b = function then(onFulFill?: (value: number) => U, onReject?: (reason: any) => U): Promise { return null }; a = b; // error because number is not assignable to string ~ !!! error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. !!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible. !!! error TS2322: Type '(value: number) => any' is not assignable to type '(value: string) => any'. !!! error TS2322: Types of parameters 'value' and 'value' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'.