Using NGRX/router-store 9.2
This code (root.reducer.ts
):
export interface State {
[fromRouter.DEFAULT_ROUTER_FEATURENAME]: fromRouter.RouterReducerState<any>;
}
const rootReducer = combineReducers({
[fromRouter.DEFAULT_ROUTER_FEATURENAME]: fromRouter.routerReducer,
});
export function reducers(state: State | undefined, action: Action) {
return rootReducer(state, action);
}
builds into this type def (root.reducer.d.ts
):
export interface State {
[fromRouter.DEFAULT_ROUTER_FEATURENAME]: fromRouter.RouterReducerState<any>;
}
export declare function reducers(state: State | undefined, action: Action): {
router: fromRouter.RouterReducerState<T>;
};
export { fromRouter };
With the error being Cannot find name 'T'.
Shouldn't the build have included the generic typings?
What am I doing wrong?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…