patronum icon indicating copy to clipboard operation
patronum copied to clipboard

remap with null handling

Open sergeysova opened this issue 4 years ago • 0 comments

interface Value {
  foo: number | null;
  bar?: string;
}
const $demo = createStore<Value | null>(null);

const [$foo, $bar] = remap($demo, ["foo", "bar"]);
// type: [Store<number | null>, Store<string | null>]

const $justFoo = remap($demo, "foo");
// type: Store<number | null>

Alternative names?

  • rechain

sergeysova avatar Nov 14 '21 17:11 sergeysova