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

Add debug type tests and allow undefined shape in reshape #100

Merged
merged 4 commits into from
Oct 7, 2020

Conversation

sergeysova
Copy link
Contributor

@sergeysova sergeysova commented Oct 7, 2020

1. Allow to return undefined from shape in reshape method:

const source = createStore<{ last?: string, first: string }>({ first: "hi" })

const { first, last } = reshape({
  source,
  shape: {
    first: (data) => data.first,
    last: (data) => data.last,
  },
})

last.getState() // null

2. Cover debug with type tests

@sergeysova sergeysova added enhancement Improvement in existing feature tests Add new tests or change type system labels Oct 7, 2020
@sergeysova sergeysova changed the title Add type tests and allow undefined shape in reshape Add debug type tests and allow undefined shape in reshape Oct 7, 2020
@sergeysova sergeysova mentioned this pull request Oct 7, 2020
14 tasks
@sergeysova sergeysova merged commit c39de03 into main Oct 7, 2020
@sergeysova sergeysova deleted the test/improve-type-tests branch October 7, 2020 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement in existing feature tests Add new tests or change type system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant