Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Destructuring breaks user commands (when using mage-sdk-js) #226

@stelcheck

Description

@stelcheck
export default class {
	public static async execute(
		state: mage.core.IState,
		{ userId, password }: any
	) {
		return UserModule.login(state, userId, password);
	}
}

This will break because MAGE will not know what name to give to the destructured variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions