mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add definitions for smshelper (#42061)
This commit is contained in:
parent
f47104d0f0
commit
fb3f0de44e
10
types/smshelper/index.d.ts
vendored
Normal file
10
types/smshelper/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for smshelper 0.1
|
||||
// Project: https://github.com/jaygel179/smshelper.js#readme
|
||||
// Definitions by: André Matthies <https://github.com/matthiez>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function count(text: string): number;
|
||||
|
||||
export function detectEncoding(text: string): 'GSM_7BIT' | 'GSM_7BIT_EX' | 'UTF16';
|
||||
|
||||
export function parts(text: string): number;
|
||||
7
types/smshelper/smshelper-tests.ts
Normal file
7
types/smshelper/smshelper-tests.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import * as smshelper from 'smshelper';
|
||||
|
||||
const charCount = smshelper.count('MY_RANDOM_MESSAGE');
|
||||
|
||||
const encoding = smshelper.detectEncoding('MY_RANDOM_MESSAGE');
|
||||
|
||||
const smsCount = smshelper.parts('MY_RANDOM_MESSAGE');
|
||||
23
types/smshelper/tsconfig.json
Normal file
23
types/smshelper/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"smshelper-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/smshelper/tslint.json
Normal file
1
types/smshelper/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user