Merge pull request #32113 from BendingBender/npm-email

[npm-email] Add types
This commit is contained in:
Daniel Rosenwasser 2019-01-14 14:05:25 -08:00 committed by GitHub
commit d66d624fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 0 deletions

14
types/npm-email/index.d.ts vendored Normal file
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>;

View File

@ -0,0 +1,3 @@
import npmEmail = require('npm-email');
npmEmail('sindresorhus'); // $ExpectType Promise<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",
"npm-email-tests.ts"
]
}

View File

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