Merge pull request #5121 from Microsoft/shorthandPropsInDestructuring · linuxcodefire/TypeScript@1b5dc0d · GitHub
Skip to content

Commit 1b5dc0d

Browse files
committed
Merge pull request microsoft#5121 from Microsoft/shorthandPropsInDestructuring
parse/check/emit shorthand property assignment in destructuring
2 parents 5736521 + a556209 commit 1b5dc0d

13 files changed

Lines changed: 1125 additions & 38 deletions

src/compiler/checker.ts

Lines changed: 58 additions & 28 deletions

src/compiler/diagnosticMessages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,10 @@
800800
"category": "Error",
801801
"code": 1311
802802
},
803+
"'=' can only be used in an object literal property inside a destructuring assignment.": {
804+
"category": "Error",
805+
"code": 1312
806+
},
803807
"Duplicate identifier '{0}'.": {
804808
"category": "Error",
805809
"code": 2300

src/compiler/emitter.ts

Lines changed: 15 additions & 3 deletions

0 commit comments

Comments
 (0)