The following code produces this complaint from the compiler: Expected 0 arguments, but got 1. TS2554
const [resetTo$, doResetTo] = createSignal();
doResetTo(5);
whereas this code will compile:
const [resetTo$, doResetTo] = createSignal(x => x);
doResetTo(5);
and so will this:
const [resetTo$, doResetTo] = createSignal<number>();
doResetTo(5);
I'm not sure I find this intuitive, or understand why that overload at
|
export function createSignal(): [Observable<void>, () => void] |
is necessary. Assuming this is all as intended, do you wish me to document it?
The following code produces this complaint from the compiler:
Expected 0 arguments, but got 1. TS2554whereas this code will compile:
and so will this:
I'm not sure I find this intuitive, or understand why that overload at
react-rxjs/packages/utils/src/createSignal.ts
Line 23 in 6444c03