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.