import { registerPlugin } from '../__core/plugin' ; declare module '../types' { interface IModelOptions < State = { } , Effects = { } , Computed = { } > { hooks ? : { init ? : ( ) => void ; } & ThisType < CombineObject < State , Effects , Computed > > ; } } const setupHooks = ( ins , hooks = { } ) => { if ( hooks . init ) { Promise . resolve ( ) . then ( ( ) => { hooks . init . call ( ins ) ; } ) ; } } ; registerPlugin ( 'hooks' , setupHooks , 'internal' ) ;