From fa54089575953a969e3f5d512192e383c3837e1a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:54:49 +0000 Subject: [PATCH] Bump typescript from 4.0.5 to 4.1.5 (#661) --- package.json | 2 +- src/constants/breakpoints/index.ts | 7 ++++--- src/constants/mediaQueries/index.ts | 9 +-------- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 5c8dad7c2..d7d065768 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "rimraf": "^3.0.2", "rollup": "^2.26.11", "rollup-plugin-size-snapshot": "0.12.0", - "typescript": "^4.0.2", + "typescript": "^4.1.5", "webpack": "^4.41.2", "yarn-run-all": "^3.1.1" }, diff --git a/src/constants/breakpoints/index.ts b/src/constants/breakpoints/index.ts index 3a3b9bbdd..2e9616755 100644 --- a/src/constants/breakpoints/index.ts +++ b/src/constants/breakpoints/index.ts @@ -1,11 +1,12 @@ import { throwOnUndefinedProperty } from '../../utils'; -// When adding a new breakpoint, make sure to include it in the ../mediaQueries TS type -export default throwOnUndefinedProperty({ +const BREAKPOINTS = { xs: 330, sm: 576, md: 768, lg: 992, xl: 1200, xxl: 1440, -}); +} as const; + +export default throwOnUndefinedProperty(BREAKPOINTS); diff --git a/src/constants/mediaQueries/index.ts b/src/constants/mediaQueries/index.ts index 79f2bb9e0..4554ccc72 100644 --- a/src/constants/mediaQueries/index.ts +++ b/src/constants/mediaQueries/index.ts @@ -1,14 +1,7 @@ import { throwOnUndefinedProperty } from '../../utils'; import BREAKPOINTS from '../breakpoints'; -interface MediaQueriesType extends Record { - xsUp: string; - smUp: string; - mdUp: string; - lgUp: string; - xlUp: string; - xxlUp: string; -} +type MediaQueriesType = Record<`${keyof typeof BREAKPOINTS}Up`, string>; const mediaQueries = Object.entries(BREAKPOINTS).reduce( (accumulator, [label, px]) => ({ diff --git a/yarn.lock b/yarn.lock index 6e5d1ac65..692920532 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13726,10 +13726,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.0.2: - version "4.0.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" - integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== +typescript@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72" + integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA== unfetch@^4.1.0: version "4.2.0"