The problem is that if no value is specified, the this type for the function is implicitly any , so your full definition will be:
function a(this: {x : number}) { return ""; } function b(fn: (this: any)=> string) { }
The two functions are compatible since any can be assigned to any other type, including {x : number} , and this behavior is allowed even in strictFunctions and strict .
The only way to guarantee incompatibility is to define this on b as void as an expression of the fact that no this will be passed to fn :
function a(this: {x : number}) { return ""; } function b(fn: (this: void)=> string) { } b(a);
Regarding the question of why this is not the default behavior, the compiler command has an open problem, so I assume they are studying it. See issue and discussion on the topic
source share