File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ export class Random {
97
97
/**
98
98
* Returns random element from the given array.
99
99
*
100
+ * @template T The type of the entries to pick from.
100
101
* @param array Array to pick the value from. Defaults to `['a', 'b', 'c']`.
101
102
*
102
103
* @example
@@ -113,6 +114,7 @@ export class Random {
113
114
/**
114
115
* Returns a subset with random elements of the given array in random order.
115
116
*
117
+ * @template T The type of the entries to pick from.
116
118
* @param array Array to pick the value from. Defaults to `['a', 'b', 'c']`.
117
119
* @param count Number of elements to pick.
118
120
* When not provided, random number of elements will be picked.
@@ -156,6 +158,8 @@ export class Random {
156
158
/**
157
159
* Returns a random key or value from given object.
158
160
*
161
+ * @template T The type of `Record` to pick from.
162
+ * @template K The keys of `T`.
159
163
* @param object The object to get the keys or values from.
160
164
* @param field If this is set to `'key'`, this method will a return a random key of the given instance.
161
165
* If this is set to `'value'`, this method will a return a random value of the given instance.
You can’t perform that action at this time.
0 commit comments