const store = { x: 1 };
const [value] = useChange(store, 'x' as 'x' | null | undefined); // value is inferred as "number | undefined"
value + 1; // TS error
use-change also doesn't create ghost properties such as "null" or "undefined" anymore.
const store = { x: 1 };
const [value] = useChange(store, 'x' as 'x' | null | undefined); // value is inferred as "number | undefined"
value + 1; // TS error
use-change also doesn't create ghost properties such as "null" or "undefined" anymore.