import { createToken } from '@tinkoff/dippy' ; description export const HOOK_TOKEN = createToken < Hooks > ( 'hooks' ) ; type Hook < TPayload > = ( context : any , payload ? : TPayload , options ? : any ) => TPayload ; export interface Hooks { /**
     * Register hooks
     */ registerHooks < TPayload > ( name , list ) : void ; /**
     * Run sync hook
     */ runHooks < TPayload > ( name , context , payload ? , options ? ) : TPayload ; /**
     * Run async hooksЗапуск ассихронных хуков
     */ runAsyncHooks < TPayload > ( name , context , payload , options ? ) : TPayload ; /**
     * Run promise hooks
     */ runPromiseHooks ( name , context , options ? ) : < TPayload > ( payload : TPayload ) => Promise < TPayload > | Promise < never > ; }