You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typescript checking fails when ternary operator logic is extractedΒ #48146
Marking the value as readonly will make example 1 work. And the reason has been explained in the corresponding fix PR here, which in brief is
...
We'd effectively have to check that there are no assignments to obj.data between the declaration of isString and the reference to isString in the if statement. This adds complexity and could be prohibitively expensive.
Activity
equt commentedon Mar 7, 2022
Marking the value as
readonlywill make example 1 work. And the reason has been explained in the corresponding fix PR here, which in brief is