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)
.map(([name, command]) => {
return [name, (...args: any[]) => command(...args)({ ...props, dispatch })]
}))
})) as SingleCommands
return {
...formattedCommands,
chain: () => this.createChain(tr, dispatch),
} as SingleCommands & { chain: () => ChainedCommands }
}
}
public buildProps(tr: Transaction, shouldDispatch = true) {