Merge pull request #33713 from satyarohith/viewport-list

Add type definitions for viewport-list
This commit is contained in:
Nathan Shively-Sanders
2019-03-13 09:02:21 -07:00
committed by GitHub
4 changed files with 42 additions and 0 deletions

15
types/viewport-list/index.d.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
// Type definitions for viewport-list 5.1
// Project: https://github.com/kevva/viewport-list#readme
// Definitions by: Satya Rohith <https://github.com/satyarohith>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export = viewportList;
/**
* Returns a list of devices and their veiwports
*
* @param items - An array of device names to fetch
* @returns - An array of viewports
*/
declare function viewportList(items?: string[]): object[];

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"viewport-list-tests.ts"
]
}

View File

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

View File

@@ -0,0 +1,3 @@
import viewportList = require('viewport-list');
viewportList(); // $ExpectType object[]