I have this CSF type that looks like:
export type CSF = {
id: string;
name: string;
chemical: string;
EPANumber: string;
ingID: number;
ingredient: string;
types: string[];
dateModified: string;
};
And now I have this state variable: const [optionsCSF, setOptionsCSF] = useState<CSF | {}>({});
And finally this line of code: const newCSFList = CSFList.filter((c: CSF) => optionsCSF && c.name !== optionsCSF?.name);
I am getting this error: TS2339: Property name does not exist on type {} | CSF Property name does not exist on type {}