Skip to content

Commit

Permalink
fix(cache): use AllFieldsModifier type in cache.modify parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gelio committed Jun 12, 2023
1 parent 18e8bf9 commit fc50711
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cache/inmemory/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import type {
FieldMergeFunction,
} from './policies';
import type {
Modifier,
Modifiers,
ToReferenceFunction,
CanReadFunction,
AllFieldsModifier,
} from '../core/types/common';

import type { FragmentRegistryAPI } from './fragmentRegistry';
Expand Down Expand Up @@ -49,8 +49,7 @@ export interface NormalizedCache {
merge(olderId: string, newerObject: StoreObject): void;
merge(olderObject: StoreObject, newerId: string): void;

modify<Entity extends Record<string, any>>(dataId: string, fields: Modifiers<Entity>): boolean;
modify<Entity>(dataId: string, modifier: Modifier<Entity>): boolean;
modify<Entity extends Record<string, any>>(dataId: string, fields: Modifiers<Entity> | AllFieldsModifier<Entity>): boolean;
delete(dataId: string, fieldName?: string): boolean;
clear(): void;

Expand Down

0 comments on commit fc50711

Please sign in to comment.