Skip to content

Commit

Permalink
Revamp dim-api reducer test and fix more reversing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed Nov 25, 2024
1 parent 8c2f633 commit 24c87bb
Show file tree
Hide file tree
Showing 3 changed files with 641 additions and 614 deletions.
13 changes: 13 additions & 0 deletions src/app/dim-api/api-types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import {
DeleteLoadoutUpdate,
DeleteSearchUpdate,
DestinyVersion,
Loadout,
ProfileUpdate,
SearchType,
} from '@destinyitemmanager/dim-api-types';

// https://stackoverflow.com/questions/51691235/typescript-map-union-type-to-another-union-type
Expand All @@ -22,9 +24,20 @@ export interface DeleteLoadoutUpdateWithRollback extends DeleteLoadoutUpdate {
destinyVersion: DestinyVersion;
}

export interface DeleteSearchUpdateWithRollback extends DeleteSearchUpdate {
before: {
query: string;
type: SearchType;
saved: boolean;
};
platformMembershipId: string;
destinyVersion: DestinyVersion;
}

/**
* A version of ProfileUpdate that also includes rollback info in a "before" property.
*/
export type ProfileUpdateWithRollback =
| DeleteSearchUpdateWithRollback
| DeleteLoadoutUpdateWithRollback
| AddUpdateInfo<ProfileUpdate>;
Loading

0 comments on commit 24c87bb

Please sign in to comment.