Skip to content

Commit 7dbcdc0

Browse files
committed
docs: fix missing template parameter docs
1 parent 33f773c commit 7dbcdc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/random.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export class Random {
9797
/**
9898
* Returns random element from the given array.
9999
*
100+
* @template T The type of the entries to pick from.
100101
* @param array Array to pick the value from. Defaults to `['a', 'b', 'c']`.
101102
*
102103
* @example
@@ -113,6 +114,7 @@ export class Random {
113114
/**
114115
* Returns a subset with random elements of the given array in random order.
115116
*
117+
* @template T The type of the entries to pick from.
116118
* @param array Array to pick the value from. Defaults to `['a', 'b', 'c']`.
117119
* @param count Number of elements to pick.
118120
* When not provided, random number of elements will be picked.
@@ -156,6 +158,8 @@ export class Random {
156158
/**
157159
* Returns a random key or value from given object.
158160
*
161+
* @template T The type of `Record` to pick from.
162+
* @template K The keys of `T`.
159163
* @param object The object to get the keys or values from.
160164
* @param field If this is set to `'key'`, this method will a return a random key of the given instance.
161165
* If this is set to `'value'`, this method will a return a random value of the given instance.

0 commit comments

Comments
 (0)