This PR includes the following proposed change(s):
In addition to the changes that were highlighted in #3518 This overhauls the reducers to use type guards
This is branched off of that PR as an addition
Added Union Class for all the Modals
added the redux action NEW_PROMPT as a static class member to the Prompt class, adding tighter coupling of it to the existing member function.
Added missing (unused) clearAll functionality to Prompt class.
[!NOTE]
Since all new Prompts are treated the same in regard to handling, NEW_PROMPT still uses string matching, so action type is cast for clarity.
The alternative was having an identical check for each type of modal that yielded the same result.
Overview
This PR includes the following proposed change(s):
NEW_PROMPT
as a static class member to thePrompt
class, adding tighter coupling of it to the existing member function.