Merge pull request #31425 from BendingBender/get-emails

[get-emails] Add types
This commit is contained in:
Nathan Shively-Sanders
2018-12-17 09:39:55 -08:00
committed by GitHub
4 changed files with 38 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
import getEmails = require('get-emails');
const text = 'Lorem ipsum dolor, sindresorhus@gmail.com consectetuer unicorn@rainbow.cake elit.';
// $ExpectType Set<string>
getEmails(text);
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for get-emails 2.1
// Project: https://github.com/sindresorhus/get-emails#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = getEmails;
declare function getEmails(text: string): Set<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",
"get-emails-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }