diff --git a/types/get-res/get-res-tests.ts b/types/get-res/get-res-tests.ts new file mode 100644 index 0000000000..d767a6d054 --- /dev/null +++ b/types/get-res/get-res-tests.ts @@ -0,0 +1,3 @@ +import getRes = require('get-res'); + +getRes(); // $ExpectType Promise diff --git a/types/get-res/index.d.ts b/types/get-res/index.d.ts new file mode 100644 index 0000000000..36fb22d94c --- /dev/null +++ b/types/get-res/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for get-res 3.0 +// Project: https://github.com/kevva/get-res#readme +// Definitions by: Satya Rohith +// 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; diff --git a/types/get-res/tsconfig.json b/types/get-res/tsconfig.json new file mode 100644 index 0000000000..aad9127e1b --- /dev/null +++ b/types/get-res/tsconfig.json @@ -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" + ] +} diff --git a/types/get-res/tslint.json b/types/get-res/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/get-res/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }