mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 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:
4
types/disposable-email/disposable-email-tests.ts
Normal file
4
types/disposable-email/disposable-email-tests.ts
Normal 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
7
types/disposable-email/index.d.ts
vendored
Normal 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;
|
||||
23
types/disposable-email/tsconfig.json
Normal file
23
types/disposable-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",
|
||||
"disposable-email-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/disposable-email/tslint.json
Normal file
3
types/disposable-email/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "@definitelytyped/dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user