crimx/observable-hooks

useSubscription typescript wont allow undefined or null input$

finnmerlett opened this issue · 4 comments

In the docs it says that the useSubscription hook will take an input$ (first parameter) of Observable<T> | null | undefined, but the typescript type definition only allows input$ to be of type Observable<T>. Is this intentional (and so a mistake in the docs), and mean the hook requires an observable input$, or is it a mistake in the typing definitions?

crimx commented

In the docs it says that the useSubscription hook will take an input$ (first parameter) of Observable | null | undefined

Can you provide a link to the docs so that I can better understand you question?

crimx commented

Oh I see what you meant. It's a mistake in the docs.

crimx commented

Fixed. Thanks for pointing out!

No problem :) also respect for the super-speedy response, that's very impressive