[npm-email] Add types

This commit is contained in:
Dimitri Benin
2019-01-14 00:46:35 +01:00
parent 3a69de74e2
commit 70bb5e397f
4 changed files with 41 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for npm-email 3.0
// Project: https://github.com/sindresorhus/npm-email#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = npmEmail;
/**
* Get the email of an npm user.
*
* @param username npm username to look up.
* @returns A promise for the user's email address.
*/
declare function npmEmail(username: string): Promise<string>;
+3
View File
@@ -0,0 +1,3 @@
import npmEmail = require('npm-email');
npmEmail('sindresorhus'); // $ExpectType Promise<string>
+23
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",
"npm-email-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }