Skip to content

Commit

Permalink
releases 3.5.31
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Oct 7, 2024
1 parent 01c3961 commit 100d09e
Show file tree
Hide file tree
Showing 31 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion func/after.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param callback 回调
* @param context 上下文
*/
export declare function after<C>(count: number, callback: (this: C, ...args: any[]) => any, context?: C): (this: any,...args: any[]) => any;
export declare function after<C = any>(count: number, callback: (this: C, ...args: any[]) => any, context?: C): (this: any,...args: any[]) => any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/arrayEach.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function arrayEach<T, C>(list: T[] | ArrayLike<T>, iterate: (this: C, item: T, index: number, list: T[]) => void, context?: C): void;
export declare function arrayEach<C>(obj: any[], iterate: (this: C, item: any, index: number, obj: any) => void, context?: C): void;
export declare function arrayEach<T, C = any>(list: T[] | ArrayLike<T>, iterate: (this: C, item: T, index: number, list: T[]) => void, context?: C): void;
export declare function arrayEach<C = any>(obj: any[], iterate: (this: C, item: any, index: number, obj: any) => void, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/before.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param callback 回调
* @param context 上下文
*/
export declare function before<C>(count: number, callback: (this: C, rests: any[], ...args: any[]) => any, context?: C): (this: any, ...args: any[]) => any;
export declare function before<C = any>(count: number, callback: (this: C, rests: any[], ...args: any[]) => any, context?: C): (this: any, ...args: any[]) => any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/bind.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param context 上下文
* @param params 额外的参数
*/
export declare function bind<C>(callback: (this: C, ...args: any[]) => any, context?: C, ...params: any[]): (this: any, ...args: any[]) => any;
export declare function bind<C = any>(callback: (this: C, ...args: any[]) => any, context?: C, ...params: any[]): (this: any, ...args: any[]) => any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/countBy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 回调/属性
* @param context 上下文
*/
export declare function countBy<T, C>(list: T[], iterate: string | number | ((this: C, item: T, index: number, list: T[]) => string | number), context?: C): { [key: string]: number };
export declare function countBy<T, C = any>(list: T[], iterate: string | number | ((this: C, item: T, index: number, list: T[]) => string | number), context?: C): { [key: string]: number };

/**
* 集合分组统计,返回各组中对象的数量统计
* @param obj 对象
* @param iterate 回调/属性
* @param context 上下文
*/
export declare function countBy<T, C>(obj: T, iterate: string | number | ((this: C, item: any, key: string, obj: T) => string | number), context?: C): { [key: string]: number };
export declare function countBy<T, C = any>(obj: T, iterate: string | number | ((this: C, item: any, key: string, obj: T) => string | number), context?: C): { [key: string]: number };

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/debounce.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface DebounceOptions {
* @param wait 毫秒
* @param options 可选参数
*/
export declare function debounce<C>(callback: (this: C, ...args: any[]) => any, wait: number, options?: DebounceOptions): (this: C, ...args: any[]) => any;
export declare function debounce<C = any>(callback: (this: C, ...args: any[]) => any, wait: number, options?: DebounceOptions): (this: C, ...args: any[]) => any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/each.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function each<T, C>(list: T[] | ArrayLike<T>, iterate: (this: C, item: T, index: number, list: T[]) => void, context?: CSSKeyframeRule): void;
export declare function each<T, C = any>(list: T[] | ArrayLike<T>, iterate: (this: C, item: T, index: number, list: T[]) => void, context?: CSSKeyframeRule): void;

/**
* 通用迭代器
* @param obj 对象
* @param iterate 回调
* @param context 上下文
*/
export declare function each<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;
export declare function each<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
6 changes: 3 additions & 3 deletions func/eachTree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export interface EachTreeOptions {
* @param {Object} options {children: 'children'}
* @param {Object} context 上下文
*/
export declare function eachTree<T, C>(list: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => void, options?: EachTreeOptions, context?: C): void;
export declare function eachTree<C>(list: any[], iterate: (this: C, item: any, index: number, items: any[], path: string[], parent: any, nodes: any[]) => void, options?: EachTreeOptions, context?: C): void;
export declare function eachTree<C>(list: any, iterate: (this: C, item: any, index: number, items: any, path: string[], parent: any, nodes: any) => void, options?: EachTreeOptions, context?: C): void;
export declare function eachTree<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => void, options?: EachTreeOptions, context?: C): void;
export declare function eachTree<C = any>(list: any[], iterate: (this: C, item: any, index: number, items: any[], path: string[], parent: any, nodes: any[]) => void, options?: EachTreeOptions, context?: C): void;
export declare function eachTree<C = any>(list: any, iterate: (this: C, item: any, index: number, items: any, path: string[], parent: any, nodes: any) => void, options?: EachTreeOptions, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/every.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function every<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): boolean;
export declare function every<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): boolean;

/**
* 对象中的值中的每一项运行给定函数,如果该函数对每一项都返回 true,则返回 true,否则返回 false
* @param list 数组
* @param iterate 回调
* @param context 上下文
*/
export declare function every<T, C>(list: T, iterate: (this: C, item: any, key: string, list: T) => boolean, context?: C): boolean;
export declare function every<T, C = any>(list: T, iterate: (this: C, item: any, key: string, list: T) => boolean, context?: C): boolean;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/filter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function filter<T, C>(array: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T[];
export declare function filter<T, C = any>(array: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T[];

/**
* 查找匹配第一条数据
* @param obj 数组
* @param iterate 回调
* @param context 上下文
*/
export declare function filter<T, C>(obj: T, iterate: (this: C, item: any, key: string, list: T) => boolean, context?: C): any;
export declare function filter<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, list: T) => boolean, context?: C): any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/filterTree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface FilterTreeOptions {
* @param {Object} options {children: 'children'}
* @param {Object} context 上下文
*/
export declare function filterTree<T, C>(list: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => boolean, options?: FilterTreeOptions, context?: C): T[];
export declare function filterTree<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => boolean, options?: FilterTreeOptions, context?: C): T[];

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/find.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function find<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T;
export declare function find<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T;

/**
* 从左至右遍历,匹配最近的一条数据
* @param obj 对象
* @param iterate 回调
* @param context 上下文
*/
export declare function find<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): any;
export declare function find<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/findIndexOf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 迭代器
* @param context 上下文
*/
export declare function findIndexOf<T, C>(list: T[], iterate: (this: C, item: T, index: any, obj: T[]) => boolean, context?: C): number;
export declare function findIndexOf<T, C = any>(list: T[], iterate: (this: C, item: T, index: any, obj: T[]) => boolean, context?: C): number;

/**
* 返回对象第一个索引值
* @param obj 对象
* @param iterate 迭代器
* @param context 上下文
*/
export declare function findIndexOf<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): number;
export declare function findIndexOf<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): number;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/findKey.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function findKey<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[])=> boolean, context?: C): number;
export declare function findKey<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T[])=> boolean, context?: C): number;

/**
* 查找匹配第一条数据的键
* @param obj 对象
* @param iterate 回调
* @param context 上下文
*/
export declare function findKey<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T)=> boolean, context?: C): any;
export declare function findKey<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T)=> boolean, context?: C): any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/findLast.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function findLast<T, C>(array: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T;
export declare function findLast<T, C = any>(array: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T;

/**
* 从右至左遍历,匹配最近的一条数据
* @param obj 对象
* @param iterate 回调
* @param context 上下文
*/
export declare function findLast<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): any;
export declare function findLast<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/findLastIndexOf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 迭代器
* @param context 上下文
*/
export declare function findLastIndexOf<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): number;
export declare function findLastIndexOf<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): number;

/**
* 从最后开始的索引值,返回对象第一个索引值
* @param obj 对象
* @param iterate 迭代器
* @param context 上下文
*/
export declare function findLastIndexOf<C>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => boolean, context?: C): number;
export declare function findLastIndexOf<C = any>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => boolean, context?: C): number;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/findTree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface FindTreeOptions {
* @param {Object} options {children: 'children'}
* @param {Object} context 上下文
*/
export declare function findTree<T, C>(list: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => boolean, options?: FindTreeOptions, context?: C): FindTerrResult<T>;
export declare function findTree<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => boolean, options?: FindTreeOptions, context?: C): FindTerrResult<T>;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/forOf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* 已废弃,被 some, every 替换
* @deprecated
*/
export declare function forOf<C>(obj: any, iterate: (this: C, item: any, index: any, obj: any) => boolean, context?: C): void;
export declare function forOf<C = any>(obj: any, iterate: (this: C, item: any, index: any, obj: any) => boolean, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/groupBy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* @param iterate 回调/对象属性
* @param context 上下文
*/
export declare function groupBy<T, C>(list: T[], iterate: string | number | ((this: C, item: T, index: number, obj: T[]) => string | number), context?: C): { [key: string]: T[] };
export declare function groupBy<T, C = any>(list: T[], iterate: string | number | ((this: C, item: T, index: number, obj: T[]) => string | number), context?: C): { [key: string]: T[] };

/**
* 集合分组,默认使用键值分组,如果有 iterate 则使用结果进行分组
* @param obj 对象
* @param iterate 回调/对象属性
* @param context 上下文
*/
export declare function groupBy<T, C>(obj: T, iterate: string | number | ((this: C, item: any, key: string, obj: T) => string | number), context?: C): { [key: string]: any[] };
export declare function groupBy<T, C = any>(obj: T, iterate: string | number | ((this: C, item: any, key: string, obj: T) => string | number), context?: C): { [key: string]: any[] };

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
8 changes: 4 additions & 4 deletions func/lastArrayEach.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function lastArrayEach<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => void, context?: C): void;
export declare function lastArrayEach<T, C>(list: T, iterate: (this: C, item: any, index: number, list: T) => void, context?: C): void;
export declare function lastArrayEach<C>(list: any[], iterate: (this: C, item: any, index: number, list: any[]) => void, context?: C): void;
export declare function lastArrayEach<C>(list: any, iterate: (this: C, item: any, index: number, list: any) => void, context?: C): void;
export declare function lastArrayEach<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => void, context?: C): void;
export declare function lastArrayEach<T, C = any>(list: T, iterate: (this: C, item: any, index: number, list: T) => void, context?: C): void;
export declare function lastArrayEach<C = any>(list: any[], iterate: (this: C, item: any, index: number, list: any[]) => void, context?: C): void;
export declare function lastArrayEach<C = any>(list: any, iterate: (this: C, item: any, index: number, list: any) => void, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
8 changes: 4 additions & 4 deletions func/lastEach.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function lastEach<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T) => void, context?: C): void;
export declare function lastEach<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;
export declare function lastEach<C>(obj: any[], iterate: (this: C, item: any, key: string, obj: any[]) => void, context?: C): void;
export declare function lastEach<C>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => void, context?: C): void;
export declare function lastEach<T, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T) => void, context?: C): void;
export declare function lastEach<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;
export declare function lastEach<C = any>(obj: any[], iterate: (this: C, item: any, key: string, obj: any[]) => void, context?: C): void;
export declare function lastEach<C = any>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => void, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/lastForOf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* 已废弃
* @deprecated
*/
export declare function lastForOf<C>(obj: any, iterate: (this: C, item: any, index: any, obj: any) => boolean, context?: C): void;
export declare function lastForOf<C = any>(obj: any, iterate: (this: C, item: any, index: any, obj: any) => boolean, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
4 changes: 2 additions & 2 deletions func/lastObjectEach.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function lastObjectEach<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;
export declare function lastObjectEach<C>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => void, context?: C): void;
export declare function lastObjectEach<T, C = any>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;
export declare function lastObjectEach<C = any>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => void, context?: C): void;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param iterate 回调
* @param context 上下文
*/
export declare function map<T, U, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => U, context?: C): U[];
export declare function map<T, U, C = any>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => U, context?: C): U[];

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
6 changes: 3 additions & 3 deletions func/mapTree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export interface MapTreeOptions {
* @param {Object} options {children: 'children', mapChildren: 'children}
* @param {Object} context 上下文
*/
export declare function mapTree<T, U, C>(array: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => U, options?: MapTreeOptions, context?: C): U[];
export declare function mapTree<U, C>(array: any[], iterate: (this: C, item: any, index: number, items: any[], path: string[], parent: any, nodes: any[]) => U, options?: MapTreeOptions, context?: C): U[];
export declare function mapTree<U, C>(array: any, iterate: (this: C, item: any, index: number, items: any, path: string[], parent: any, nodes: any) => U, options?: MapTreeOptions, context?: C): U[];
export declare function mapTree<T, U, C = any>(array: T[], iterate: (this: C, item: T, index: number, items: T[], path: string[], parent: T, nodes: T[]) => U, options?: MapTreeOptions, context?: C): U[];
export declare function mapTree<U, C = any>(array: any[], iterate: (this: C, item: any, index: number, items: any[], path: string[], parent: any, nodes: any[]) => U, options?: MapTreeOptions, context?: C): U[];
export declare function mapTree<U, C = any>(array: any, iterate: (this: C, item: any, index: number, items: any, path: string[], parent: any, nodes: any) => U, options?: MapTreeOptions, context?: C): U[];

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
2 changes: 1 addition & 1 deletion func/once.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param context 上下文
* @param params 额外的参数
*/
export declare function once<S, C>(callback: (this: S, ...args: any[]) => any, context?: C, ...params: any[]): (this: S | C, ...args: any[]) => any;
export declare function once<S, C = any>(callback: (this: S, ...args: any[]) => any, context?: C, ...params: any[]): (this: S | C, ...args: any[]) => any;

declare module './ctor' {
interface XEUtilsMethods {
Expand Down
Loading

0 comments on commit 100d09e

Please sign in to comment.