Answer the question
In order to leave comments, you need to log in
How to correctly type Object.entries?
I welcome everyone. Tell me how to properly type the [key, value] pair for the acc object
const newFrontAttributes = frontAttributes.map((item: IFrontAttribute) => {
return Object.entries(item).reduce((acc: Partial<IFrontAttribute>, [key, value]: ??????) => {
acc[key] = { ...value, ...validate(value.value) };
return acc;
}, {});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question