refactoring

This commit is contained in:
Philipp Kühn
2020-11-02 17:22:04 +01:00
parent 7bfab4685f
commit 7338266813

View File

@@ -113,12 +113,12 @@ export default class CommandManager {
.entries(commands) .entries(commands)
.map(([name, command]) => { .map(([name, command]) => {
return [name, (...args: any[]) => command(...args)({ ...props, dispatch })] return [name, (...args: any[]) => command(...args)({ ...props, dispatch })]
})) })) as SingleCommands
return { return {
...formattedCommands, ...formattedCommands,
chain: () => this.createChain(tr, dispatch), chain: () => this.createChain(tr, dispatch),
} as SingleCommands & { chain: () => ChainedCommands } }
} }
public buildProps(tr: Transaction, shouldDispatch = true) { public buildProps(tr: Transaction, shouldDispatch = true) {