source: imaps-frontend/node_modules/react-use/esm/useUpsert.d.ts@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 423 bytes
Line 
1import { ListActions } from './useList';
2import { IHookStateInitAction } from './misc/hookState';
3export interface UpsertListActions<T> extends Omit<ListActions<T>, 'upsert'> {
4 upsert: (newItem: T) => void;
5}
6/**
7 * @deprecated Use `useList` hook's upsert action instead
8 */
9export default function useUpsert<T>(predicate: (a: T, b: T) => boolean, initialList?: IHookStateInitAction<T[]>): [T[], UpsertListActions<T>];
Note: See TracBrowser for help on using the repository browser.