typescript Type 'undefined' cannot be used as an index type code example
Example: Type 'undefined' cannot be used as an index type.ts(2538)
const fName: string =
WidgetTableCols[this.state.sortCol!].toLocaleLowerCase();
const fName: string =
WidgetTableCols[this.state.sortCol!].toLocaleLowerCase();