mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add types to randomatic (#45822)
* Add types to randomatic * Include definition author for randomatic
This commit is contained in:
parent
7152e63617
commit
1882299f09
15
types/randomatic/index.d.ts
vendored
Normal file
15
types/randomatic/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// Type definitions for randomatic 3.1
|
||||
// Project: https://github.com/jonschlinkert/randomatic
|
||||
// Definitions by: Frelia <https://github.com/execfera>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function randomatic(p: string, l?: number, options?: {
|
||||
chars?: string;
|
||||
exclude?: string | string[];
|
||||
}): string;
|
||||
|
||||
declare namespace randomatic {
|
||||
const isCrypto: boolean;
|
||||
}
|
||||
|
||||
export = randomatic;
|
||||
5
types/randomatic/randomatic-tests.ts
Normal file
5
types/randomatic/randomatic-tests.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as randomize from 'randomatic';
|
||||
|
||||
randomize('*', 10); // $ExpectedType string
|
||||
randomize('?', 20, { chars: 'jonschlinkert' }); // $ExpectedType string
|
||||
randomize('*', 20, { exclude: '0oOiIlL1' }); // $ExpectedType string
|
||||
23
types/randomatic/tsconfig.json
Normal file
23
types/randomatic/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",
|
||||
"randomatic-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/randomatic/tslint.json
Normal file
1
types/randomatic/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user