UNPKG

mobx-state-tree

Version:

Opinionated, transactional, MobX powered state container

18 lines (17 loc) 476 B
/** * @hidden */ export declare enum Hook { afterCreate = "afterCreate", afterAttach = "afterAttach", afterCreationFinalization = "afterCreationFinalization", beforeDetach = "beforeDetach", beforeDestroy = "beforeDestroy" } export interface IHooks { [Hook.afterCreate]?: () => void; [Hook.afterAttach]?: () => void; [Hook.beforeDetach]?: () => void; [Hook.beforeDestroy]?: () => void; } export type IHooksGetter<T> = (self: T) => IHooks;