From 02193e40500e64df175c89b9ff18f356d2543a72 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 29 May 2018 15:31:34 -0700 Subject: [PATCH] Add types for find-versions --- types/find-versions/find-versions-tests.ts | 3 +++ types/find-versions/index.d.ts | 7 +++++++ types/find-versions/tsconfig.json | 16 ++++++++++++++++ types/find-versions/tslint.json | 1 + 4 files changed, 27 insertions(+) create mode 100644 types/find-versions/find-versions-tests.ts create mode 100644 types/find-versions/index.d.ts create mode 100644 types/find-versions/tsconfig.json create mode 100644 types/find-versions/tslint.json diff --git a/types/find-versions/find-versions-tests.ts b/types/find-versions/find-versions-tests.ts new file mode 100644 index 0000000000..81ea6ca974 --- /dev/null +++ b/types/find-versions/find-versions-tests.ts @@ -0,0 +1,3 @@ +import findVersions = require('find-versions'); + +findVersions('node v1.0.0'); diff --git a/types/find-versions/index.d.ts b/types/find-versions/index.d.ts new file mode 100644 index 0000000000..449c5a45c3 --- /dev/null +++ b/types/find-versions/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for find-versions 2.0 +// Project: https://github.com/sindresorhus/find-versions +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function findVersions(version: string): string[]; +export = findVersions; diff --git a/types/find-versions/tsconfig.json b/types/find-versions/tsconfig.json new file mode 100644 index 0000000000..19c09a9df8 --- /dev/null +++ b/types/find-versions/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "find-versions-tests.ts"] +} diff --git a/types/find-versions/tslint.json b/types/find-versions/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/find-versions/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }