Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
plugin.commands.forEach(({ id, name, type, docs }) => {
const doks = this.useExistingArgTypesIfProvided(
Object.assign({}, docs, {
plugin: {
id,
},
})
)
Commands.addCommand(id, { name, type, ...doks })
registerCommand(id, RunCommand.bind(undefined, plugin.id, id))
RegisterEmitter(id, this.emitCommand.bind(undefined, plugin, id))
})
}