From a6bf231f3f715da60f2e4e9ba7ef3f293a9c8a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Rodrigues?= Date: Fri, 27 Sep 2019 16:58:12 +0100 Subject: [PATCH] [typography-breakpoint-constants] new typings (#38662) --- .../index.d.ts | 20 +++++++++++ .../tsconfig.json | 23 ++++++++++++ .../tslint.json | 1 + .../typography-breakpoint-constants-tests.ts | 35 +++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 types/typography-breakpoint-constants/index.d.ts create mode 100644 types/typography-breakpoint-constants/tsconfig.json create mode 100644 types/typography-breakpoint-constants/tslint.json create mode 100644 types/typography-breakpoint-constants/typography-breakpoint-constants-tests.ts diff --git a/types/typography-breakpoint-constants/index.d.ts b/types/typography-breakpoint-constants/index.d.ts new file mode 100644 index 0000000000..d785b99258 --- /dev/null +++ b/types/typography-breakpoint-constants/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for typography-breakpoint-constants 0.16 +// Project: https://github.com/KyleAMathews/typography.js +// Definitions by: Luis Rodrigues +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export const DEFAULT_MEDIA_QUERY: string; +export const DEFAULT_WIDTH: string; +export const LARGER_DISPLAY_MEDIA_QUERY: string; +export const LARGER_DISPLAY_WIDTH: string; +export const LARGE_DISPLAY_MEDIA_QUERY: string; +export const LARGE_DISPLAY_WIDTH: string; +export const MIN_DEFAULT_MEDIA_QUERY: string; +export const MIN_LARGER_DISPLAY_MEDIA_QUERY: string; +export const MIN_LARGE_DISPLAY_MEDIA_QUERY: string; +export const MIN_MOBILE_MEDIA_QUERY: string; +export const MIN_TABLET_MEDIA_QUERY: string; +export const MOBILE_MEDIA_QUERY: string; +export const MOBILE_WIDTH: string; +export const TABLET_MEDIA_QUERY: string; +export const TABLET_WIDTH: string; diff --git a/types/typography-breakpoint-constants/tsconfig.json b/types/typography-breakpoint-constants/tsconfig.json new file mode 100644 index 0000000000..f7dd7b9d27 --- /dev/null +++ b/types/typography-breakpoint-constants/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "typography-breakpoint-constants-tests.ts" + ] +} diff --git a/types/typography-breakpoint-constants/tslint.json b/types/typography-breakpoint-constants/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/typography-breakpoint-constants/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/typography-breakpoint-constants/typography-breakpoint-constants-tests.ts b/types/typography-breakpoint-constants/typography-breakpoint-constants-tests.ts new file mode 100644 index 0000000000..1aaa5739c9 --- /dev/null +++ b/types/typography-breakpoint-constants/typography-breakpoint-constants-tests.ts @@ -0,0 +1,35 @@ +import { + DEFAULT_MEDIA_QUERY, + DEFAULT_WIDTH, + LARGER_DISPLAY_MEDIA_QUERY, + LARGER_DISPLAY_WIDTH, + LARGE_DISPLAY_MEDIA_QUERY, + LARGE_DISPLAY_WIDTH, + MIN_DEFAULT_MEDIA_QUERY, + MIN_LARGER_DISPLAY_MEDIA_QUERY, + MIN_LARGE_DISPLAY_MEDIA_QUERY, + MIN_MOBILE_MEDIA_QUERY, + MIN_TABLET_MEDIA_QUERY, + MOBILE_MEDIA_QUERY, + MOBILE_WIDTH, + TABLET_MEDIA_QUERY, + TABLET_WIDTH, +} from 'typography-breakpoint-constants'; + +function testString(value: string): void {} + +testString(DEFAULT_MEDIA_QUERY); +testString(DEFAULT_WIDTH); +testString(LARGER_DISPLAY_MEDIA_QUERY); +testString(LARGER_DISPLAY_WIDTH); +testString(LARGE_DISPLAY_MEDIA_QUERY); +testString(LARGE_DISPLAY_WIDTH); +testString(MIN_DEFAULT_MEDIA_QUERY); +testString(MIN_LARGER_DISPLAY_MEDIA_QUERY); +testString(MIN_LARGE_DISPLAY_MEDIA_QUERY); +testString(MIN_MOBILE_MEDIA_QUERY); +testString(MIN_TABLET_MEDIA_QUERY); +testString(MOBILE_MEDIA_QUERY); +testString(MOBILE_WIDTH); +testString(TABLET_MEDIA_QUERY); +testString(TABLET_WIDTH);