Skip to content

Consider allowing Generic Trigger Keys #18

Description

Something like

const enum TriggerAreas {
    Foo,
    Bar,
    Baz,
    Cat
};

type TriggerKeyType = string|MyObject|TriggerAreas;
export class MyStore extends ReSub.StoreBase<TriggerKeyType>{
...
    // Trigger for enum, string and a complex object are fully typesafe
    this.trigger([TriggerAreas.Foo, 'fooitemKey', fooObject]);
...
}

This would allow passing anything a developer wants through keys and allows more documentation context to be gathered from the specified trigger keys.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions