While building my project (reactjs starter + typescript) on production, I encountered this TypeScript error:
TypeScript error: Argument of type '<T>(list: readonly Record<"dataField", T>[]) => T[]' is not assignable to parameter...
Types of parameters 'list' and 'x' are incompatible.
Type 'K extends readonly (infer U)[] ? U[] : K extends Dictionary<infer U> ? Dictionary<U> : never' is not assignable...
Type '(K extends Dictionary<infer U> ? Dictionary<U> : never) | {}[]' is not assignable to type 'readonly Record<"dataField", ...
Type 'K extends Dictionary<infer U> ? Dictionary<U> : never' is not assignable to type 'readonly Record<"dataField", ...
Type 'Dictionary<{}>' is missing the following properties from type 'readonly Record<"dataField", {}>[]': length, concat,...
Type 'Dictionary<any>' is not assignable to type 'readonly Record<"dataField", {}>[]'.
Type 'any[] | Dictionary<any>' is not assignable to type 'readonly Record<"dataField", {}>[]'.
Type 'Dictionary<any>' is missing the following properties from type 'readonly Record<"dataField", {}>[]': lengt...
261 | export const getColumnsToGroup = R.pipe(
262 | R.filter(R.propEq('summarize', false)),
> 263 | R.map(R.prop('dataField'))
| ^
264 | );
265 |
266 | export const groupBimInstances = (columnsToGroup: IBootstrapTableColumnConfig[]) => R.pipe(
This error did not occur on my development machine. It suddenly appeared today during deployment.
I'm unsure about what it means or how to resolve it. Any suggestions?