Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

fix: type-safety of action creators #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mixvar
Copy link

@mixvar mixvar commented May 21, 2019

  • enforce correct number of arguments to action creators using function overloads
  • update README

closes #27 and #28 - both issues are related and are fixed by the same piece of code.

I am unable to add tests for the fixed behaviour as the code would simply fail to compile.

Now that createAction('type') is the same as createAction<void>('type') instead of createAction<{}>('type') I updated the README to suggest the shorter form as preferable.

- enforce correct number of arguments using fuction overloads
- update README

closes knpwrs#27 and knpwrs#28
@codecov-io
Copy link

codecov-io commented May 21, 2019

Codecov Report

Merging #29 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #29   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines          39     39           
  Branches        7      7           
=====================================
  Hits           39     39
Impacted Files Coverage Δ
src/create-action.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98001a1...3bfedf5. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action creators are not 100% type safe
2 participants