I had looked over some other issues that were similiar to this one, however some of them had talked about modifying the tsconfig.json and changing the compiler options to include
"strictNullChecks": true,
"noImplicitAny": false,
However, my code looks like this:
export interface DetailedRankings {
show_id: number;
name: string;
category: string;
episodes: number;
story?: number;
characters?: number;
overall?: number;
}
function handleInputChange(category: keyof DetailedRankings, event: string, index: number) {
const value_number: number = parseFloat(event);
let list: DetailedRankings[] = [...detailed_ranks];
let obj: DetailedRankings = list[index];
obj[category] = value_number <--- Having issue with this.
}
I am under the impression that the reason this issue is being caused is because I have string and number within the interface. I am just a bit lost on what is causing the issue of.
Type 'number' is not assignable to type 'never'.