Получение следующей ошибки во время компиляции:
ERROR in node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(10,31): error TS2420: Class 'NgRedux<RootState>' incorrectly implements interface 'ObservableStore<RootState>'.
Types of property 'dispatch' are incompatible.
Type 'Dispatch<RootState>' is not assignable to type 'Dispatch<AnyAction>'.
Type 'RootState' is not assignable to type 'AnyAction'.
node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(37,33): error TS2344: Type 'RootState' does not satisfy the constraint 'Action<any>'.
node_modules/@angular-redux/store/lib/src/components/root-store.d.ts(18,24): error TS2344: Type 'RootState' does not satisfy the constraint 'Action<any>'.
Настройка среды:
Версия NodeJS: 8.9.1
Версия машинописного текста: 2.8.1
Угловая версия: 5.0.0
@ angular-redux / версия магазина: 7.1.1
ОС: Windows 10
Добавьте код, и вы также являетесь типом RootState
, где ожидается AnyAction
.
Более конкретно, покажите, пожалуйста, ng-redux.d.ts
. Зачем понадобилось строить этот тип defn?
Страница @ angular-redux / store на github подтверждает это как ошибку и будет исправлена в будущих выпусках.
Понижение версии Redux с 4.0.0 до 3.7.0 устранило проблему на данный момент.
не могли бы вы добавить свой код