Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remap with null handling #174

Open
sergeysova opened this issue Nov 14, 2021 · 0 comments
Open

remap with null handling #174

sergeysova opened this issue Nov 14, 2021 · 0 comments
Labels
RFC Some new feature that should be discussed

Comments

@sergeysova
Copy link
Member

sergeysova commented Nov 14, 2021

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 sergeysova added the RFC Some new feature that should be discussed label Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Some new feature that should be discussed
Projects
None yet
Development

No branches or pull requests

1 participant