Fix Get/Set being enumerable (#32264)

* Fix Get/Set being enumerable

fixes #3610

* fix tests

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Pathurs
2020-02-28 09:08:20 +11:00
committed by GitHub
parent e7c578a67d
commit 5c85febb0c
296 changed files with 1541 additions and 1317 deletions

View File

@@ -566,7 +566,7 @@ namespace ts {
properties.push(setter);
}
properties.push(createPropertyAssignment("enumerable", createTrue()));
properties.push(createPropertyAssignment("enumerable", getAccessor || setAccessor ? createFalse() : createTrue()));
properties.push(createPropertyAssignment("configurable", createTrue()));
const expression = setTextRange(

View File

@@ -1675,7 +1675,7 @@ namespace ts {
}
properties.push(
createPropertyAssignment("enumerable", createTrue()),
createPropertyAssignment("enumerable", getAccessor || setAccessor ? createFalse() : createTrue()),
createPropertyAssignment("configurable", createTrue())
);