angular - Typescript, @ngrx and default store values -
i think missing obvious trying work @ngrx . trying use nested reducers, , want able return default starting child values. child export const counter:reducer<number> = (state:number = 0, action:action = {type:null}) => { switch (action.type) { my question how use initialise counter. counters.ts looks like export const counters:reducer<number[]> = (state:number[] = [], action:action) => { switch (action.type) { case add_counter: return [counter(), ...state]; this works have typescript error on counter: supplied parameters not match signature of call target , i'm wondering how around this. i'm using @ngrx, provides this: export interface action { type: string; payload?: any; } export interface reducer<t> { (state: t, action: action): t; } export class store<t> extends behaviorsubject<t> { private _storesubscription: subscription<t> constructor(private _dispatcher:dispatche...