simple-object-state
Version:
An experiemental object oriented state mangment lib
12 lines (11 loc) • 469 B
TypeScript
/**
* Shallow Equal function should talk two states and compare if they are
* the same. The same being the a shallow comparison on sub-objects
* within the state and also accepting a partial of the current state,
* as the next state parameter. Meaning that only the keys of the nextState
* parameter will be checked
*/
export declare function shallowEqual({ nextState, state }: {
nextState: Record<string, any>;
state: Record<string, any>;
}): boolean;