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

Better type inference for MediaQuery #180

Merged
merged 3 commits into from
Oct 13, 2019

Conversation

tmkn
Copy link
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

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