Skip to content

Commit d708ea1

Browse files
committed
Consolidate Update generic type and remove unused overload
1 parent e8ad717 commit d708ea1

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/entities/models.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,10 @@ export abstract class Dictionary<T> implements DictionaryNum<T> {
2929
[id: string]: T | undefined
3030
}
3131

32-
export interface UpdateStr<T> {
33-
id: string
34-
changes: Partial<T>
35-
}
36-
37-
export interface UpdateNum<T> {
38-
id: number
39-
changes: Partial<T>
40-
}
41-
4232
/**
4333
* @alpha
4434
*/
45-
export type Update<T> = UpdateStr<T> | UpdateNum<T>
35+
export type Update<T> = { id: EntityId; changes: Partial<T> }
4636

4737
/**
4838
* @alpha
@@ -93,10 +83,6 @@ export interface EntityStateAdapter<T> {
9383
state: S,
9484
keys: TypeOrPayloadAction<EntityId[]>
9585
): S
96-
removeMany<S extends EntityState<T>>(
97-
state: S,
98-
keys: PayloadAction<number[]>
99-
): S
10086

10187
removeAll<S extends EntityState<T>>(state: S): S
10288

0 commit comments

Comments
 (0)