The problem seems to be specific to how strictFunctionTypes affects generic class type.
Here is a class that closely reproduces what happens and cannot be simplified
This is at it's core an issue of variance. So first a variance primer:
Given a generic type Foo<T>
, and two related types Animal
and Dog extends Animal
. There are four possible relationships between Foo<Animal>
and Foo<Dog>
:
Foo<Animal>
and Foo<Dog>
as it does for Animal
and Dog
, so Foo<Dog>
is a sub type of Foo<Animal>
, which also means Foo<Dog>
is assignable to Foo<Animal>
type CoVariant<T> = () => T
declare var coAnimal: CoVariant<Animal>
declare var coDog: CoVariant<Dog>
coDog = coAnimal; //