Suspected breaking change with pushing and assigning a 'derived' value into a 'base' array #59016
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
inline assignment array derived base push 'Object literal may only specific known properties'
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.0.4#code/JYOwLgpgTgZghgYwgAgEJwM4oN4FgBQyywAJgFzIgCuAtgEbQDcBAvgQaJLIigCLTAAbhBLIIAD0ggSGNJhwEiIODQgUMYKKADmzfG3wEEAexAbikGhgrosAbQC6yALzJHeggBsIYCxBoAjBT8WsIket6+wJYATMECYR740f4BLsjYxOTIAQA0lCpqyADkYAAWwLKVyMYA1shQENpwUCTeGBjFyCx6KVYAdAAOVBhlABR9AQCUSX0YQyPjE7HpmaQUMfnKqhSlFVWyAHIA8gAqNfWgyACs-QAM-QAs+XRUUbJ1xCDIj-0AnP1rl0WFMZkA
π» Code
π Actual behavior
'Object literal may only specific known properties' error
π Expected behavior
The code should not produce an error
Additional information about the issue
It is possible that this is a change to the order in which types are inferred, but I have been unable to find any details in the documentation/changelog.
The text was updated successfully, but these errors were encountered: