import { createToken } from '@tinkoff/dippy' ; import type { Command } from '../../typings/commands' ; export interface CommandRunner { run ( commandName , parameters ) : Promise < any > ; } export const COMMAND_NAME_TOKEN = createToken < string > ( 'command name' ) ; export const COMMAND_EXECUTION_TOKEN = createToken < Promise < any > > ( 'command execution' ) ; export const COMMAND_PARAMETERS_TOKEN = createToken < Record < string , any > > ( 'command parameters' ) ; export const COMMAND_MAP_TOKEN = createToken < { [ name ] : ( ) => Promise < { default : Command ; } > ; } > ( 'command map' ) ; export const COMMAND_RUNNER_TOKEN = createToken < CommandRunner > ( 'command runner' ) ;