Union of variant setters uses getter type for assignment #45376
Labels
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
Bug Report
π Search Terms
variant accessor setter union
π Version & Regression Information
β― Playground Link
Example from below
π» Code
I didn't include it in the playground, but behavior is the same for
class
orinterface
.π Actual behavior
Assignment of number is flagged as an error, even though both sides of the union allow assignment of a number.
π Expected behavior
Assignment should not be flagged.
Originally reported by @ws93
The text was updated successfully, but these errors were encountered: