Property ‘fName’ comes from an index signature, so it must be accessed with [‘fName’]

In my opinion, this is a completely unnecessary feature in TypeScript. To disable it, you need to change the file tsconfig.json:

"compilerOptions": {
// ...
  "noPropertyAccessFromIndexSignature": false,
// ...
}

Leave a Comment