import { ImmerState } from 'immer' ; import { IChangeTarget } from './Change' ; /** Notify observers of a change to the root value */ export function commit < T , TT extends T > ( target , oldValue , newValue , prop ? , deleted ? , state ? ) ; /** Notify observers of a change to some property value */ export function commit < T extends object , P extends keyof T , Deleted extends boolean , OldValue extends Deleted extends true ? T [ P ] : T [ P ] | undefined , NewValue extends Deleted extends true ? undefined : T [ P ] > ( target , oldValue , newValue , prop , deleted ? , state ? ) ; export function commit ( target , oldValue , newValue , prop = null , deleted = false , state = null ) { target . _onChange ( { target , prop , oldValue , newValue , deleted , state , } ) ; }