Assigning to unknown
/ {}
doesn't change its inferred type
#60092
Labels
Duplicate
An existing issue was already created
π Search Terms
type inference, fail, unknown, {}, assign, inferred type
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.7.0-dev.20240928#code/GYVwdgxgLglg9mABFApgZygRgBQA8Bci4A1mHAO5gCUiA3gFCJOK6IC8iARGnALbpQATjDABzTo2a4AdABsUYqAAt6AX3r1QkWAmQCATHkK1VNBsxbsuPfhmFiJFmfMUr1m8NHhJUGAMxGiHYioogAPohgILwARiiC4YgxcHDyAIZIEVGysongACYowCIo+YlwMQBWKNCJaACesamJANoAuokAbnAwZVkonfGJMTCiIlBmkkysHNx8AvbiUyxyCqLKakA
π» Code
π Actual behavior
It doesn't change inferred type of
x
when it is assigned.π Expected behavior
It should.
The text was updated successfully, but these errors were encountered: