Skip to content

JoshMcCullough/react-ts-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is failing, don't know why! Stackoverflow question is here: https://stackoverflow.com/questions/54240438/redux-typescript-typesafe-actions

Build Status

UPDATE This is now fixed. The problem was that my action types were not defined as const! Easy to overlook, which I did. See this commit for the fix.

src/reducer.ts:29:30 - error TS2339: Property 'payload' does not exist on type 'EmptyAction<string> | PayloadAction<string, { profiles: Profile[]; }> | PayloadAction<string, { error: ApiErrorResponse; }>'.
  Property 'payload' does not exist on type 'EmptyAction<string>'.
29             profiles: action.payload.profiles,
                                ~~~~~~~
src/reducer.ts:37:34 - error TS2339: Property 'payload' does not exist on type 'EmptyAction<string> | PayloadAction<string, { profiles: Profile[]; }> | PayloadAction<string, { error: ApiErrorResponse; }>'.
  Property 'payload' does not exist on type 'EmptyAction<string>'.
37             errorMessage: action.payload.error.message,
                                    ~~~~~~~

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published