Created
November 17, 2021 19:14
-
-
Save DistractionBoy/6ec2ee421ed5c30724765e533dd98b8f to your computer and use it in GitHub Desktop.
Revisions
-
DistractionBoy created this gist
Nov 17, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ActionMap<M extends { [index: string]: any }> = { [Key in keyof M]: M[Key] extends undefined ? { type: Key } : { type: Key payload: M[Key] } }