knpwrs / redux-ts-utils

Everything you need to create type-safe applications with Redux!
MIT License
55 stars 4 forks source link

fix: type-safety of action creators #29

Open mixvar opened 5 years ago

mixvar commented 5 years ago

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.

codecov-io commented 5 years ago

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%> (ø) :arrow_up:

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.