I found the following method's signature
export function retry<T>(this: Observable<T>, count: number = -1): Observable<T> {
return higherOrder(count)(this) as Observable<T>;
}
Where the first parameter is this
and typed Observable<T>
. While having this
into the arguments seems to be wrong, the compiler accepts this syntax and I saw this pattern a few times already. Could someone explains what is its purpose?