Skip to content

Commit

Permalink
Resolves issue #2001.
Browse files Browse the repository at this point in the history
Reorder overloaded update method so that if callback is provided TS at least do not care whether T is circular or not.
  • Loading branch information
dfahlander committed May 27, 2024
1 parent 9354fc6 commit a09b699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/public/types/table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export interface Table<T=any, TKey=any, TInsertType=T> {
add(item: TInsertType, key?: TKey): PromiseExtended<TKey>;
update(
key: TKey | T,
changes: UpdateSpec<TInsertType>): PromiseExtended<number>;
changes: ((obj: T, ctx:{value: any, primKey: IndexableType}) => void | boolean)): PromiseExtended<number>;
update(
key: TKey | T,
changes: ((obj: T, ctx:{value: any, primKey: IndexableType}) => void | boolean)): PromiseExtended<number>;
changes: UpdateSpec<TInsertType>): PromiseExtended<number>;
put(item: TInsertType, key?: TKey): PromiseExtended<TKey>;
delete(key: TKey): PromiseExtended<void>;
clear(): PromiseExtended<void>;
Expand Down

0 comments on commit a09b699

Please sign in to comment.