mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
feat: Add typings for math-random (#42082)
* feat: Add typings for math-random Signed-off-by: Richie Bendall <richiebendall@gmail.com> * fix: `cryptographic` should be true | undefined Signed-off-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for math-random 1.0
|
||||
// Project: https://github.com/michaelrhodes/math-random#readme
|
||||
// Definitions by: Richie Bendall <https://github.com/Richienb>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare const mathRandom: {
|
||||
(): number;
|
||||
cryptographic: true | undefined;
|
||||
};
|
||||
|
||||
export = mathRandom;
|
||||
@@ -0,0 +1,4 @@
|
||||
import mathRandom = require("math-random");
|
||||
|
||||
mathRandom(); // $ExpectType number
|
||||
mathRandom.cryptographic; // $ExpectType true | undefined
|
||||
@@ -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",
|
||||
"math-random-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user