const whereString = data.map((chatParams: IChatsParams) => {
return ...Object.keys(chatParams).map(key => { // Пишет expression expected
if(
key !== 'recordsCount' &&
key !== 'orderByField' &&
key !== 'orderBy' &&
key !== 'recordsLimit'
) {
return `chat.${key}=` + chatParams[key as keyof typeof chatParams] + ', ';
}
return '';
})
});