From 2893205028d9388f0a28a9f5c87b331b9dd8bf43 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 22:41:25 +0100 Subject: [PATCH] Add types for github-username --- .../github-username/github-username-tests.ts | 4 ++++ types/github-username/index.d.ts | 8 +++++++ types/github-username/tsconfig.json | 23 +++++++++++++++++++ types/github-username/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/github-username/github-username-tests.ts create mode 100644 types/github-username/index.d.ts create mode 100644 types/github-username/tsconfig.json create mode 100644 types/github-username/tslint.json diff --git a/types/github-username/github-username-tests.ts b/types/github-username/github-username-tests.ts new file mode 100644 index 0000000000..0caee06bdc --- /dev/null +++ b/types/github-username/github-username-tests.ts @@ -0,0 +1,4 @@ +import githubUsername = require('github-username'); + +// $ExpectType Promise +githubUsername('sindresorhus@gmail.com', 'deadbeef'); diff --git a/types/github-username/index.d.ts b/types/github-username/index.d.ts new file mode 100644 index 0000000000..a1083c7dc3 --- /dev/null +++ b/types/github-username/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for github-username 4.1 +// Project: https://github.com/sindresorhus/github-username#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = githubUsername; + +declare function githubUsername(email: string, token: string): Promise; diff --git a/types/github-username/tsconfig.json b/types/github-username/tsconfig.json new file mode 100644 index 0000000000..33308515f6 --- /dev/null +++ b/types/github-username/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", + "github-username-tests.ts" + ] +} diff --git a/types/github-username/tslint.json b/types/github-username/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/github-username/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }