mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2026-03-14 00:22:42 +03:00
* Convert @redux-devtools-dock-monitor to ESM * chart-monitor * Updates * log-monitor * slider-monitor * Update * inspector-monitor * Updates * rtk-query-monitor * test-tab * Patch it * Test * Update * trace-tab * Update * Fix * Upgrade redux-devtools components to major versions Updated package versions for several redux-devtools components to major. * Fix
72 lines
2.0 KiB
Diff
72 lines
2.0 KiB
Diff
diff --git a/simple-diff.d.ts b/simple-diff.d.ts
|
|
index 873e486216e2981703e1105c153b6a55c11210a8..14c24a48ab71cb4af7c8b4607b30cbae0189ff0d 100644
|
|
--- a/simple-diff.d.ts
|
|
+++ b/simple-diff.d.ts
|
|
@@ -1,35 +1,37 @@
|
|
-declare function diff(oldObj: any, newObj: any, ops?: DiffOptions): DiffEvent[];
|
|
+declare function diff(oldObj: any, newObj: any, ops?: diff.DiffOptions): diff.DiffEvent[];
|
|
|
|
-export default diff;
|
|
+declare namespace diff {
|
|
+ export interface DiffOptions extends Partial<PathChange> {
|
|
+ idProp?: string,
|
|
+ idProps?: {[path: string]: string},
|
|
+ addEvent?: string,
|
|
+ removeEvent?: string,
|
|
+ changeEvent?: string,
|
|
+ addItemEvent?: string,
|
|
+ removeItemEvent?: string,
|
|
+ moveItemEvent?: string,
|
|
+ callback?: (event: DiffEvent) => void,
|
|
+ comparators?: Array<[any, Comparator]>,
|
|
+ ignore?: Comparator,
|
|
+ }
|
|
|
|
-export interface DiffOptions extends Partial<PathChange> {
|
|
- idProp?: string,
|
|
- idProps?: {[path: string]: string},
|
|
- addEvent?: string,
|
|
- removeEvent?: string,
|
|
- changeEvent?: string,
|
|
- addItemEvent?: string,
|
|
- removeItemEvent?: string,
|
|
- moveItemEvent?: string,
|
|
- callback?: (event: DiffEvent) => void,
|
|
- comparators?: Array<[any, Comparator]>,
|
|
- ignore?: Comparator,
|
|
-}
|
|
-
|
|
-export type Path = Array<string | number>;
|
|
+ export type Path = Array<string | number>;
|
|
|
|
-export interface PathChange {
|
|
- oldPath: Path,
|
|
- newPath: Path,
|
|
-}
|
|
+ export interface PathChange {
|
|
+ oldPath: Path,
|
|
+ newPath: Path,
|
|
+ }
|
|
|
|
-export type Comparator = (oldValue: any, newValue: any, options: PathChange) => boolean;
|
|
+ export type Comparator = (oldValue: any, newValue: any, options: PathChange) => boolean;
|
|
|
|
-export interface DiffEvent extends PathChange {
|
|
- type: 'add' | 'remove' | 'change' | 'add-item' | 'remove-item' | 'move-item',
|
|
- oldValue: any,
|
|
- newValue: any,
|
|
- oldIndex?: number,
|
|
- curIndex?: number,
|
|
- newIndex?: number,
|
|
+ export interface DiffEvent extends PathChange {
|
|
+ type: 'add' | 'remove' | 'change' | 'add-item' | 'remove-item' | 'move-item',
|
|
+ oldValue: any,
|
|
+ newValue: any,
|
|
+ oldIndex?: number,
|
|
+ curIndex?: number,
|
|
+ newIndex?: number,
|
|
+ }
|
|
}
|
|
+
|
|
+export = diff;
|