ez-common-ts/lib/commons/record-util.d.ts

34 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

2023-11-11 21:28:01 +08:00
import { UnwrapNestedRefs } from "vue";
export declare enum RecordClearMode {
2023-11-11 15:30:11 +08:00
delete = 2,
reset = 1
}
export declare const withRecord: (obj: UnwrapNestedRefs<Record<string, any>>) => {
2023-11-11 21:28:01 +08:00
clear: (mode?: RecordClearMode) => void;
2023-11-11 15:30:11 +08:00
replace: (newVal: UnwrapNestedRefs<Record<string, any>>) => void;
};
2023-11-11 21:28:01 +08:00
/**
*
* test path
* test
* path
* @param arrays
* @returns
*/
export declare function assignRecords<T extends Record<string, any>>(...arrays: T[][]): {
test: (equal?: ((l: T, r: T) => boolean) | undefined) => T[];
path: (...paths: string[]) => T[];
};
/**
*
*
*
*
*
* @param target
* @param sources
* @returns
*/
2024-01-30 11:09:07 +08:00
export declare const extendRecord: <T extends Record<string, any>>(target: T, ...sources: (T | undefined)[]) => T;