With typescript 2.6 and --strictFunctionTypes enabled in tsconfig, there's a compilation error in rxjs/scheduler/VirtualTimeScheduler.d.ts. Error is as follows:
(22,22): error TS2415: Class 'VirtualAction<T>' incorrectly extends base class 'AsyncAction<T>'.
Types of property 'work' are incompatible.
Type '(this: VirtualAction<T>, state?: T) => void' is not assignable to type '(this: AsyncAction<T>, state?: T) => void'.
The 'this' types of each signature are incompatible.
Type 'AsyncAction<T>' is not assignable to type 'VirtualAction<T>'.
Property 'index' is missing in type 'AsyncAction<T>'.
Looking at the code, removing the this parameter in work function would fix the issue, but I assume there's some reason for explicitly typing this.
With typescript 2.6 and --strictFunctionTypes enabled in tsconfig, there's a compilation error in
rxjs/scheduler/VirtualTimeScheduler.d.ts
. Error is as follows:Looking at the code, removing the
this
parameter inwork
function would fix the issue, but I assume there's some reason for explicitly typingthis
.