External module "random/sample/docs/types/index.d"
Type aliases
SampleFunction
Type declaration
-
-
Parameters
Returns
Array
<
any
>
SamplePopFunction
Sample
PopFunction: (options?: PopOptions) => Array<any>
Type declaration
-
-
Parameters
Returns
Array
<
any
>
Samples elements from an array-like object.
array-like object from which to sample elements
function options
sample size
element probabilities
boolean indicating whether to sample with replacement (default: true)
must provide valid options
size
option must be less than or equal to the length ofx
when thereplace
option isfalse
sample