Als ich durch die rxjs Bibliothek Suche ich auf diese Funktion gestolpert:Typoskript dies als Parameter
export function map<T, R>(this: Observable<T>, project: (value: T, index: number) => R, thisArg?: any): Observable<R> {
if (typeof project !== 'function') {
throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
}
return this.lift(new MapOperator(project, thisArg));
}
Quelle: https://github.com/ReactiveX/rxjs/blob/master/src/operator/map.ts
Ich frage mich, was wirklich passiert, wenn ein Argument this
namens vorbei. Wird es nur wie jeder andere Parameter behandelt oder gibt es spezielle Aktionen ein, wenn Sie dies tun?