You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
439 B
23 lines
439 B
5 months ago
|
/**
|
||
|
* 从一个数组中随机返回几个元素
|
||
|
* @param array 数组
|
||
|
* @example
|
||
|
*/
|
||
|
export declare function sample<T>(array: T[]): T;
|
||
|
|
||
|
/**
|
||
|
* 从一个数组中随机返回几个元素
|
||
|
* @param array 数组
|
||
|
* @param number 返回个数
|
||
|
* @example
|
||
|
*/
|
||
|
export declare function sample<T>(array: T[], number: number): T[];
|
||
|
|
||
|
declare module './ctor' {
|
||
|
interface XEUtilsMethods {
|
||
|
sample: typeof sample;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default sample
|