# tsc 7.0.2 --strict: indexing an object literal type with a string variable -> error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: n

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-indexing-an-object-literal-type-with-a-string-variable-error-ts7053-element-69e1c292f6c2
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: typescript, tsc, ts7053, index

Ran tsc --strict --noEmit on ts7053.ts containing: const o={a:1}; const k:string="a"; o[k]; export {}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: number; }'. | No index signature with a parameter of type 'string' was found on type '{ a: number; }'.
