Object.keys' returntype should be specified
#49502
Labels
Duplicate
An existing issue was already created
8000
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
when you get keys of some object by
Object.keys
, then assign value to it, will get an error likeElement implicitly has an 'any' type because expression of type 'string' can't be used to index type
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
obj[key] will report error

🙂 Expected behavior
narrow
Object.keys
return type likemaybe we coule implement
UnionToTuple
like thingThe text was updated successfully, but these errors were encountered: