🤖 Merge PR #61632 Add type definitions for disposable-email by @ziishaned

* feat: add typings for disposable-email package

* feat: update tslint.json file

* feat: add new line at the end
This commit is contained in:
Zeeshan Ahmad
2022-08-11 00:43:59 +04:00
committed by GitHub
parent 22d6218d15
commit feeb4c569b
4 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import * as disposable from 'disposable-email';
disposable.validate('');
disposable.validate('', (error, isValid) => {});

7
types/disposable-email/index.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
// Type definitions for disposable-email 0.2
// Project: https://github.com/disposable/disposable#readme
// Definitions by: Zeeshan Ahmad <https://github.com/ziishaned>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function validate(domainOrEmail: string): boolean;
export function validate(domainOrEmail: string, callback: (error: null, isValid: boolean) => void): void;

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",
"disposable-email-tests.ts"
]
}

View File

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