Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Better type inference for MediaQuery#180

Merged
juanpicado merged 3 commits intoverdaccio:masterfrom
tmkn:chore/mediatypings
Oct 13, 2019
Merged

Better type inference for MediaQuery#180
juanpicado merged 3 commits intoverdaccio:masterfrom
tmkn:chore/mediatypings

Conversation

@tmkn
Copy link
Copy Markdown
Contributor

@tmkn tmkn commented Oct 11, 2019

This PR makes media.ts compatible with noImplicitAny.

While the code is now a little more verbose, TypeScript is now able to infer the types naturally, without any casts.
Consumption of the MediaQuery object stayed the same.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 11, 2019

Codecov Report

Merging #180 into master will decrease coverage by 0.16%.
The diff coverage is 80%.

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
- Coverage    88.9%   88.73%   -0.17%     
==========================================
  Files         117      117              
  Lines         928      932       +4     
  Branches      147      147              
==========================================
+ Hits          825      827       +2     
- Misses         90       92       +2     
  Partials       13       13
Impacted Files Coverage Δ
src/utils/styles/media.ts 81.81% <80%> (-18.19%) ⬇️

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.

2 participants