-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Side effect of decorator #56000
Copy link
Copy link
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: DecoratorsThe issue relates to the decorator syntaxThe issue relates to the decorator syntaxNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: DecoratorsThe issue relates to the decorator syntaxThe issue relates to the decorator syntaxNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Type
Fields
Give feedbackNo fields configured for issues without a type.
🔎 Search Terms
"decorator" "field decorator" "side effect" "decorator side effect"
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?#code/MYewdgzgLgBAYgSwKYBsAmARJoBOBDKEHGAXhgAoo8cBzJKALhgFcw0kAzBMJNAGhigwUJAA9GMAMIo8ECIlSZsRAkUngR4gJSkAfDADeAXwBQJ4DLkwACtSTDDJmIPDQczYIRzlqNAIxMbtw0Ar4ATIFQOMGhtADMkdFgNDoGTs4wAPSZMAACUBAAtAg0YERI6c5QABYIEAB0AA44II1+pDC+fpVZOflFJWU4FRkwNXVNLY1hHeE92XkFxaXlPeMNza1xs-Hpps6bbQCEicFmB1NhJzBByecwh3HXtzQmpuaWEFK16DBiImwvrZhg40hdWn5nlEzulDldTnd0rkFOgsLhVDhYVMngjXu8hNBOh0eAB3b4IdDkADkfj8VIEVLCYXpMCpcTiVK05lcIBQSHqKBANB8XIWeEmENIJDIrHYXB4aF6MAA6gAVOAmMUS6ZSsiM5lKgDyAGlNTlxY9dSw2JxuLwlWqNUA
💻 Code
🙁 Actual behavior
the decorated property and the very first property are
undefineddespite the fact that they are given a value in the constructor🙂 Expected behavior
aobject should be equal to the followingobjobjectAdditional information about the issue
No response