🤖 Merge PR #61657 feat: add typings for @ip1sms/is-disposable-phone-number package by @ziishaned

* feat: add typings for disposable-email package

* feat: update tslint.json file

* feat: add new line at the end

* feat: add typings for @ip1sms/is-disposable-phone-number package

* chore: update tests

* chore: changes for import

* chore: resolve comments
This commit is contained in:
Zeeshan Ahmad
2022-08-13 00:38:38 +04:00
committed by GitHub
parent a32597659d
commit 8a2aab1d6b
4 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
// Type definitions for @ip1sms/is-disposable-phone-number 1.1
// Project: https://github.com/iP1SMS/is-disposable-phone-number-js#readme
// Definitions by: Zeeshan Ahmad <https://github.com/ziishaned>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Determine whether a phone number is disposable.
*
* @param phoneNumber
*/
declare function isDisposablePhoneNumber(phoneNumber: string): boolean;
export = isDisposablePhoneNumber;

View File

@@ -0,0 +1,3 @@
import disposable = require('@ip1sms/is-disposable-phone-number');
disposable(''); // $ExpectType boolean

View File

@@ -0,0 +1,28 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@ip1sms/*": [
"ip1sms__*"
]
}
},
"files": [
"index.d.ts",
"ip1sms__is-disposable-phone-number-tests.ts"
]
}

View File

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