import { Store } from "../Store"; /** * Check the usage of Store#emitChange. * If the store call `Store#emitChange()` but the state of store is not changed, show warning. * https://github.com/almin/almin/issues/151 * https://github.com/almin/almin/pull/205 */ export declare class StoreGroupEmitChangeChecker { private _emitChangeStateCacheMap; /** * mark `store` as `emitChange`ed store in a UseCase life-cycle * * Warning: Show warning message if the `store`'s state is not changed. */ mark(store: Store, cachedPrevState: any, nextState: any): void; /** * Is this `store` marked by the checker? */ isMarked(store: Store): boolean; /** * unMark `store` at end of a useCase life-cycle * When the nextState is confirmed, should call it. */ unMark(store: Store): void; /** * Warning: Show warning message if the `store`'s state is modified directly. * We recommenced to use `Store#setState` for updating state of store. * * ## Example * * ```js * class MyStore extends Store { * receivePayload(){ * // direct modified * this.state = { value: "next" } * } * } * ``` */ warningIfStatePropertyIsModifiedDirectly(store: Store, prevState: any, nextState: any): void; }