I can't seem to understand why I am encountering this error
fetchFromURL(url: string): any {
return this.apiService.get(url).pipe(map(data => data));
}
fetchNextPage(): Observable<any> {
const url = 'url';
this.fetchFromURL(url).pipe(
expand(data => {
console.log(data);
})
);
}
The error I encountered is at the line containing expand(data => ... . I would like to use expand() so that I can recursively call the next API.
Type 'void' is not assignable to type 'ObservableInput<{}>'
Any suggestions would be greatly appreciated. Thank you