here is the code cell: ( props: Cell<TMonitoringEmployee,…
- User
here is the code cell: ( props: Cell<TMonitoringEmployee, TMonitoringEmployee['skillGroup']>, ) => { const skillGroupsForComponent = Object.entries(props.getValue()).map( ([id, name]) => ({ id, name, }), ); return ; }, I get a typescript error on groups Type '{ id: string; name: string; }[]' is not assignable to type 'IAbstractObject[]'. Type '{ id: string; name: string; }' is not assignable to type 'IAbstractObject'. Types of property 'id' are incompatible. Type 'string' is not assignable to type 'number'.ts(2322) interfaces.ts(125, 3): The expected type comes from property 'groups' which is declared here on type 'IntrinsicAttributes & ITagsList' (property) ITagsList.groups: IAbstractObject[] I need to change skillGroupsForComponent in such a way that it would be compatible with groups. What can I do?
- Assistant
To make the compatible with the prop expected by the , you'll need to ensure that each object in the array has the correct type. Specifically, the type requires the property to be a instead of a .