[pkg-versions] Add types

This commit is contained in:
Dimitri Benin
2019-01-13 23:52:31 +01:00
parent 3a69de74e2
commit ad3e21bcdd
4 changed files with 35 additions and 0 deletions

8
types/pkg-versions/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for pkg-versions 1.1
// Project: https://github.com/sindresorhus/pkg-versions#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = pkgVersions;
declare function pkgVersions(name: string): Promise<Set<string>>;

View File

@@ -0,0 +1,3 @@
import pkgVersions = require('pkg-versions');
pkgVersions('ava'); // $ExpectType Promise<Set<string>>

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",
"pkg-versions-tests.ts"
]
}

View File

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