TypeScript x React

[解決 TypeScript x Redux] Type ‘{}’ is missing the following properties from type ‘stateName’: [propertyname], and 5 more

[解決 TypeScript x Redux] Type ‘{}’ is missing the following properties from type ‘stateName’: [propertyname], and 5 more

TypeScript x React

TypeScript x React

TypeScript error in /Users/morita.kenji/Desktop/jbca-client/src/redux/index.ts(170,69):
Type ‘Reducer<{ router: RouterState; createAppWizard: CreateAppWizardState; cloneAppWizard: CloneAppWizardState; me: UserWithRole; appBasicSettings: AppBasicSettings; appInfoManager: AppInfoManagerState; … 23 more …; usersPresenter: UsersPresenterState; }, AnyAction>’ is not assignable to type ‘Reducer<State, LocationChangeAction>’.
Type ‘{ router: RouterState; createAppWizard: CreateAppWizardState; cloneAppWizard: CloneAppWizardState; me: UserWithRole; appBasicSettings: AppBasicSettings; appInfoManager: AppInfoManagerState; … 23 more …; usersPresenter: UsersPresenterState; }’ is not assignable to type ‘State’.
Types of property ‘adminDetail’ are incompatible.
Type ‘{}’ is missing the following properties from type ‘AdminUserDetailState’: user, firstName, lastName, firstNameKana, and 5 more.

A compilation error occurred when creating a reducer

スクリーンショット 2019-08-02 9.52.39

i check intialState and reducer

スクリーンショット 2019-08-02 9.33.45

スクリーンショット 2019-08-02 9.34.33

This problem is due to the difference between the types of state and initial state that are passed to reducer’s arguments. Check if there is any property key missing or wrong name

スクリーンショット 2019-08-02 9.53.11

(Visited 1 times, 1 visits today)