[typography-breakpoint-constants] new typings (#38662)

This commit is contained in:
Luís Rodrigues 2019-09-27 16:58:12 +01:00 committed by Ben Lichtman
parent 7b9dc4408e
commit a6bf231f3f
4 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// Type definitions for typography-breakpoint-constants 0.16
// Project: https://github.com/KyleAMathews/typography.js
// Definitions by: Luis Rodrigues <https://github.com/goblindegook>
// 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;

View File

@ -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"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -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);