I have encountered an issue that I am unsure how to solve:
"Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ prop_first: string; prop_second: string; }'. No index signature with a parameter of type 'string' was found on type '{ prop_first: string; prop_second: string; }'. :
const users = [
{ 'user': 'b', 'age': 12, 'active': true, warnings: [{propertyA: true, propertyB: false}] },
{ 'user': 'a', 'age': 22, 'active': false, warnings: [{propertyB: false}] }
];
const obj = {
propertyA: 'true',
propertyB: 'true',
};
Object.keys(obj).forEach((key, index) => {
obj[key] = !(!!obj[key]);
});
console.log(obj);
const propertyA = true
const properties = {propertyA: true, propertyB: false}
const result = users.filter(user => user.warnings.length && _.some(user.warnings, obj))
console.log(result)
console.log(!!undefined)
Does anyone have any insights on how to resolve this?