When using copy and paste to add new actions in NgRx, it is sometimes possible to forget to change the action type that is a plain string. Sure, making it a static static var makes it less likely, but still possible.
How do you detect this oversight? It can cause weird bugs that are hard to track down at runtime and seems to be something that is easier to avoid at compile time.
For example, these will cause an issue at runtime, without any warnings at compile time
export const meeting_user_doc = createAction(
'[User] selected doc',
props<{docGuid: string}>()
);
export const meeting_user_image = createAction(
'[User] selected doc',
props<{imageGuid: string}>()
);
It would be great if the tools take care of it at compile time... but even if there is a way to iterate over all the actions at startup and identify these, it would save a lot of time debugging these issues.
My package [ngrx-tslint-rules(https://github.com/timdeschryver/ngrx-tslint-rules#readme) has a rule to cover duplicate action types - see the example