mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
[latest-version] Add types
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for latest-version 4.0
|
||||
// Project: https://github.com/sindresorhus/latest-version#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = latestVersion;
|
||||
|
||||
declare function latestVersion(name: string, options?: latestVersion.Options): Promise<string>;
|
||||
|
||||
declare namespace latestVersion {
|
||||
interface Options {
|
||||
version?: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import latestVersion = require('latest-version');
|
||||
|
||||
latestVersion('ava'); // $ExpectType Promise<string>
|
||||
latestVersion('npm', { version: 'latest-5' }); // $ExpectType Promise<string>
|
||||
@@ -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",
|
||||
"latest-version-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user