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

Improve 2 #30

Merged
merged 19 commits into from
Aug 17, 2020
Merged

Improve 2 #30

merged 19 commits into from
Aug 17, 2020

Conversation

septs
Copy link
Contributor

@septs septs commented Aug 16, 2020

  • simplify editorconfig
  • simplify travis-ci config
  • simplify package.json
  • migrate tslint to eslint
  • remove unused dependency
  • esmodule expose
  • zero dependencies
  • smart factory
    if P equal unknown then
    returns a ThunkFunction without params input
    else
    returns a ThunkFunction with require params input

@codecov
Copy link

codecov bot commented Aug 16, 2020

Codecov Report

Merging #30 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #30   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           22        23    +1     
  Branches         1         1           
=========================================
+ Hits            22        23    +1     
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)

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 a14aa16...ca50bc7. Read the comment docs.

@septs
Copy link
Contributor Author

septs commented Aug 16, 2020

@xdave

  "dependencies": {
    "redux-thunk": "^2.3.0",
    "typescript-fsa": "^3.0.0"
  },

i think the two dependency, need move to peer dependency

because of src/index.ts import all is typing definition.

@septs
Copy link
Contributor Author

septs commented Aug 16, 2020

image
image
image
image

smart factory function

new feature, fixes #26

My two pull requests, contains two break changes

I think should be iterated to 2.10.0 version

@septs
Copy link
Contributor Author

septs commented Aug 16, 2020

rename generic, can make the user better understand his meaning

@xdave
Copy link
Owner

xdave commented Aug 17, 2020

Whoa this is a big one. Reviewing.

@xdave
Copy link
Owner

xdave commented Aug 17, 2020

I'll merge this, if you're done pushing things

@septs
Copy link
Contributor Author

septs commented Aug 17, 2020

@xdave smart thunk function is a new break changes

const foo = createAsync('foo', (input: undefined) => '');

foo // (input: undefined) => string
foo() // Expected 1 arguments, but got 0. ts(2554)
foo(undefined)

// but can be used like this

const bar = createAsync('bar', (input: string | void) => '');
bar // (input: string | void) => string
bar() // like is optional params
bar('sample')

@xdave
Copy link
Owner

xdave commented Aug 17, 2020

Hmm, seeing void as a function argument type is weird.

@septs
Copy link
Contributor Author

septs commented Aug 17, 2020

image

@xdave if I could know that there is an undefined
Then I will deal with it separately

@xdave
Copy link
Owner

xdave commented Aug 17, 2020

No, that's fine... let me merge this and make the 2.10.0 release

@xdave xdave merged commit 0d64744 into xdave:master Aug 17, 2020
@septs septs deleted the improve branch August 17, 2020 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants