mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 13:37:35 +00:00
Merge pull request #32113 from BendingBender/npm-email
[npm-email] Add types
This commit is contained in:
commit
d66d624fba
14
types/npm-email/index.d.ts
vendored
Normal file
14
types/npm-email/index.d.ts
vendored
Normal 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
types/npm-email/npm-email-tests.ts
Normal file
3
types/npm-email/npm-email-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import npmEmail = require('npm-email');
|
||||
|
||||
npmEmail('sindresorhus'); // $ExpectType Promise<string>
|
||||
23
types/npm-email/tsconfig.json
Normal file
23
types/npm-email/tsconfig.json
Normal 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
types/npm-email/tslint.json
Normal file
1
types/npm-email/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user