%% generate tags start %%
#software-engineering
%% generate tags end %%
#software-engineering/typescript

this is very useful, you can change this setting in the [[Tsconfig|tsconfig.json]]
## Some useful one
`strictPropertyInitialization`
Check for class properties that are declared but not set in the constructor.
`noPropertyAccessFromIndexSignature`
Enforces using indexed accessors for keys declared using an indexed type.
```ts
interface GameSettings {
// Known up-front properties
speed: "fast" | "medium" | "slow";
quality: "high" | "low";
// Assume anything unknown to the interface
// is a string.
[key: string]: string;
}
```
```ts
const settings = getSettings();
settings.speed;
settings.quality;
// This would need to be settings["username"];
settings.username;
```