我正在尝试使用以下其他库将我的 Angular 应用程序升级到 5.2.10:ngrx 5.2.0 typescript: 2.6.2 tslint 5.10.0
并在角度编译期间遇到以下错误:
`
ERROR in src/app/**/xxx-state.ts(301,5): error TS2322: Type '(string | number)[]' is not assignable to type 'string[] | number[]'.
Type '(string | number)[]' is not assignable to type 'number[]'.
Type 'string | number' is not assignable to type 'number'.
Type 'string' is not assignable to type 'number'.
src/app/***/xxx-state.ts(305,5): error TS2322: Type '(string | number)[]' is not assignable to type 'string[] | number[]'.
Type '(string | number)[]' is not assignable to type 'number[]'.
`
`
error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((searchElement: string, fromIndex?: number) => number) | ((searchElement: number, fromIndex?: nu...' has no compatible call signatures.
`
我正在使用@ngrx/entity 库从ngrx 的“module.d.ts”文件中定义的以下EntityState 接口派生我们的数据状态接口。
`
export interface EntityState<T> {
ids: string[] | number[];
entities: Dictionary<T>;
}
`
任何解决这些错误的指针?