Merge pull request #33712 from satyarohith/get-res

Add type definitions for get-res
This commit is contained in:
Nathan Shively-Sanders
2019-03-13 09:17:14 -07:00
committed by GitHub
4 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import getRes = require('get-res');
getRes(); // $ExpectType Promise<object[]>

14
types/get-res/index.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for get-res 3.0
// Project: https://github.com/kevva/get-res#readme
// Definitions by: Satya Rohith <https://github.com/satyarohith>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export = getRes;
/**
* Get ten most popular screen resolutions
*
* @returns An array with the details of ten most popular screen resolutions
*/
declare function getRes(): Promise<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",
"get-res-tests.ts"
]
}

View File

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