import { Subject } from 'rxjs'; import { CommandState, t } from '../common'; import { root } from './cmds'; export function init(args: { state$: Subject> }) { const { state$ } = args; return CommandState.create({ root, beforeInvoke: async e => { const props: t.ICommandProps = { ...e.props, state$ }; return { props }; }, }); }