type undefined cannot be used as an index type typescript 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();