Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created December 31, 2018 14:16
Show Gist options
  • Save ccapndave/188840a049ec81007c5136d7da34fd28 to your computer and use it in GitHub Desktop.
Save ccapndave/188840a049ec81007c5136d7da34fd28 to your computer and use it in GitHub Desktop.
const nums$ = fromEvent(document, "click").pipe(
mapTo(((x: number) => x + 1)),
scan((acc, whatever) => acc, 0)
);
/*
Argument of type 'MonoTypeOperatorFunction<number>' is not assignable to parameter of type 'OperatorFunction<(x: number) => number, number>'.
Types of parameters 'source' and 'source' are incompatible.
Type 'Observable<(x: number) => number>' is not assignable to type 'Observable<number>'.
Type '(x: number) => number' is not assignable to type 'number'.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment