I encountered the TypeScript error below:
Error:(34, 20) TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'number | Scheduler'. Type 'undefined[]' is not assignable to type 'Scheduler'. Property 'now' is missing in type 'undefined[]'.
when I tried using startWith in this particular context:
items$:any = Observable
.interval(250)
.map((_:any) => Math.random())
.startWith([])
.scan((acc:any, curr:any)=> [...acc, curr]);
Is there a way to cast the data to prevent this error?
Thanks,
Sean