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

feat: add type inference for defu result #24

Merged
merged 5 commits into from Oct 28, 2020
Merged

Conversation

danielroe
Copy link
Member

No description provided.

? MergeArrays<Destination, Defaults>
: Destination | Defaults
// Don't attempt to merge Functions, RegExps, Promises
: Destination extends Function
Copy link
Member

@pi0 pi0 Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we refactor all cases to a union type?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these are treated as extending Records so if we're not this verbose we get:
Screenshot from 2020-10-19 12-45-34

instead of:
Screenshot from 2020-10-19 12-44-53

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           33        33           
  Branches         9         9           
=========================================
  Hits            33        33           
Impacted Files Coverage Δ
src/defu.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 40a00cc...435d918. Read the comment docs.

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

3 participants