-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms:
Code
const a = { a: 'foo' };
Object.keys(a).forEach((key) => {
console.log(a[key]);
});Expected behavior:
No error
Actual behavior:
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: string; }'.
No index signature with a parameter of type 'string' was found on type '{ a: string; }'.
Related Issues:
aandrejevas
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug