import { useObservable } from "rxjs-hooks";
import { map } from "rxjs/operators";
export const useAsync = <State, Inputs extends any[]>(
fn: (...args: Inputs) => State,
deps: Inputs,
) =>
useObservable<State, Inputs>(
inputs$ =>
inputs$.pipe(
map(i => {
return (i as unknown) as State;
}),
),
[0, 1, 2],
deps,
);
Results in the following:

It seems that passing generic values for useObservable isn't supported. Any ideas?