mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add type definitions for nanoid-dictionary (#45918)
* Add type definitions for nanoid-dictionary * Support use specific dictionary only As per comment of peterblazejewicz https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45918 * Import types from files to avoid duplicate definitions
This commit is contained in:
parent
f09343c25f
commit
84e08dbd90
9
types/nanoid-dictionary/index.d.ts
vendored
Normal file
9
types/nanoid-dictionary/index.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Type definitions for nanoid-dictionary 3.0
|
||||
// Project: https://github.com/CyberAP/nanoid-dictionary#readme
|
||||
// Definitions by: Shengjie Pan <https://github.com/kenelm007>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export import lowercase = require('./lowercase');
|
||||
export import uppercase = require('./uppercase');
|
||||
export import numbers = require('./numbers');
|
||||
export import nolookalikes = require('./nolookalikes');
|
||||
6
types/nanoid-dictionary/lowercase.d.ts
vendored
Normal file
6
types/nanoid-dictionary/lowercase.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Lowercase English letters
|
||||
*/
|
||||
declare const lowercase: string;
|
||||
|
||||
export = lowercase;
|
||||
15
types/nanoid-dictionary/nanoid-dictionary-tests.ts
Normal file
15
types/nanoid-dictionary/nanoid-dictionary-tests.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import dict = require('nanoid-dictionary');
|
||||
import lowercase = require('nanoid-dictionary/lowercase');
|
||||
import uppercase = require('nanoid-dictionary/uppercase');
|
||||
import numbers = require('nanoid-dictionary/numbers');
|
||||
import nolookalikes = require('nanoid-dictionary/nolookalikes');
|
||||
|
||||
dict.lowercase; // $ExpectType string
|
||||
dict.uppercase; // $ExpectType string
|
||||
dict.numbers; // $ExpectType string
|
||||
dict.nolookalikes; // $ExpectType string
|
||||
|
||||
lowercase; // $ExpectType string
|
||||
uppercase; // $ExpectType string
|
||||
numbers; // $ExpectType string
|
||||
nolookalikes; // $ExpectType string
|
||||
6
types/nanoid-dictionary/nolookalikes.d.ts
vendored
Normal file
6
types/nanoid-dictionary/nolookalikes.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Numbers and english alphabet without lookalikes
|
||||
*/
|
||||
declare const nolookalikes: string;
|
||||
|
||||
export = nolookalikes;
|
||||
6
types/nanoid-dictionary/numbers.d.ts
vendored
Normal file
6
types/nanoid-dictionary/numbers.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Numbers from 0 to 9
|
||||
*/
|
||||
declare const numbers: string;
|
||||
|
||||
export = numbers;
|
||||
23
types/nanoid-dictionary/tsconfig.json
Normal file
23
types/nanoid-dictionary/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",
|
||||
"nanoid-dictionary-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/nanoid-dictionary/tslint.json
Normal file
1
types/nanoid-dictionary/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
6
types/nanoid-dictionary/uppercase.d.ts
vendored
Normal file
6
types/nanoid-dictionary/uppercase.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Uppercase English letters
|
||||
*/
|
||||
declare const uppercase: string;
|
||||
|
||||
export = uppercase;
|
||||
Loading…
Reference in New Issue
Block a user