Skip to content

Optional parameters in Actions not supported #14

@caboe

Description

@caboe

Given an action wit optional parameter:
async testIt(context: TestContext, payload?: number): Promise<void> {}

Is mapped with:
export const testAction = dispatch(test.actions.testIt)

When you call the action inside a VUE Component with the optional parameter:
test.testAction(this.$store, 123)

You will get a compile error:
Expected 1 arguments, but got 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions