Skip to content

Commit c803311

Browse files
SchrubitteflauAsyncBanana
authored andcommitted
Improve typings
1 parent 5ab38a7 commit c803311

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

index.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
interface Difference {
2-
type: "CREATE" | "REMOVE" | "CHANGE";
1+
interface DifferenceCreate {
2+
type: "CREATE";
33
path: (string | number)[];
4-
value?: any;
5-
oldValue?: any;
4+
value: any;
65
}
6+
7+
interface DifferenceRemove {
8+
type: "REMOVE";
9+
path: (string | number)[];
10+
oldValue: any;
11+
}
12+
13+
interface DifferenceChange {
14+
type: "CHANGE";
15+
path: (string | number)[];
16+
value: any;
17+
oldValue: any;
18+
}
19+
20+
type Difference = DifferenceCreate | DifferenceRemove | DifferenceChange;
21+
722
interface Options {
823
cyclesFix: boolean;
924
}

0 commit comments

Comments
 (0)