You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2024. It is now read-only.
This should fail because otherNum is not part of the State interface:
interfaceState{num: number}exportconstinitialState: State={num: 0};exportconstappsReducer=createReducer(initialState,handleAction=>[handleAction(actions.getApps.success,()=>({num: 0,otherNum: 0// adding this property should trigger a warning})),]);
Typescript only displays a warning when the return type of State is explicitly defined but it would be nice to have it happen automatically
exportconstappsReducer=createReducer(initialState,handleAction=>[handleAction(actions.getApps.success,(): State=>({// specify the return typenum: 0,otherNum: 0// this triggers a warning correctly because we added `State` as the return type})),]);