VEuPathDB / web-monorepo

A monorepo that contains all frontend code for VEuPathDB websites
Apache License 2.0
2 stars 0 forks source link

TypeScript configuration - turn on `noUncheckedIndexAccess` #1202

Open dmfalke opened 2 months ago

dmfalke commented 2 months ago

The setting noUncheckedIndexAccess impacts types such as type X = Record<string, T> or type X = { [key: string]: T }.

Without the setting turned on, the type of X.foo is T. With it turned on, the type of X.foo is T | undefined. The latter type better reflects reality, and leads to better type safety. However, turning on the setting will require a lot of updates to our code base.