mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Add missing function type to RandomSeed interface
This commit is contained in:
1
types/random-seed/index.d.ts
vendored
1
types/random-seed/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface RandomSeed {
|
||||
(range: number): number;
|
||||
range(range: number): number;
|
||||
random(): number;
|
||||
floatBetween(min: number, max: number): number;
|
||||
|
||||
@@ -9,6 +9,7 @@ const seed = 'My Secret String Value';
|
||||
const rand2 = create(seed);
|
||||
|
||||
// API
|
||||
rand1(50);
|
||||
rand1.addEntropy();
|
||||
rand1.random();
|
||||
rand1.range(100);
|
||||
|
||||
Reference in New Issue
Block a user