René's URL Explorer Experiment


Title: esnext features not transpiled within method declarations in object literals with spread elements · Issue #16765 · microsoft/TypeScript · GitHub

Open Graph Title: esnext features not transpiled within method declarations in object literals with spread elements · Issue #16765 · microsoft/TypeScript

X Title: esnext features not transpiled within method declarations in object literals with spread elements · Issue #16765 · microsoft/TypeScript

Description: TypeScript Version: 2.4.0 compilerOptions.target = ES5 Code const obj = {}; const a = { ...obj, prop() { return { ...obj, metadata: 213 } } }; Expected behavior: It compiles and transpiles the object spread operator to a call to Object.a...

Open Graph Description: TypeScript Version: 2.4.0 compilerOptions.target = ES5 Code const obj = {}; const a = { ...obj, prop() { return { ...obj, metadata: 213 } } }; Expected behavior: It compiles and transpiles the obje...

X Description: TypeScript Version: 2.4.0 compilerOptions.target = ES5 Code const obj = {}; const a = { ...obj, prop() { return { ...obj, metadata: 213 } } }; Expected behavior: It compiles and transpiles the obje...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/16765

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"esnext features not transpiled within method declarations in object literals with spread elements","articleBody":"**TypeScript Version:**  2.4.0\r\n\r\ncompilerOptions.target = ES5\r\n\r\n**Code**\r\n\r\n```ts\r\nconst obj = {};\r\nconst a = {\r\n    ...obj,\r\n    prop() {\r\n        return {\r\n            ...obj,\r\n            metadata: 213\r\n        }\r\n    }\r\n};\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nIt compiles and transpiles the object spread operator to a call to `Object.assign`.\r\n\r\n**Actual behavior:**\r\n\r\nThe object spread operator is not transpiled but simply kept. This can lead to the following error:\r\n\r\n```\r\n TypeError: Cannot read property 'kind' of undefined\r\n    at visitObjectLiteralExpression (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:56775:34)\r\n    at visitJavaScript (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:55245:28)\r\n    at visitor (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:55182:24)\r\n    at visitNode (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:49197:23)\r\n    at Object.visitEachChild (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:49479:46)\r\n    at visitReturnStatement (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:55345:23)\r\n    at visitJavaScript (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:55293:28)\r\n    at visitor (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:55182:24)\r\n    at Object.visitNodes (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:49248:48)\r\n    at transformFunctionBody (C:\\_myplace\\next\\graphql-proxy\\node_modules\\typescript\\lib\\typescript.js:56282:44)\r\n```\r\n\r\nProblem source:\r\n\r\nThe esnext transformer cuts off at method declarations within object literals that have an spread element, thus it never sees the inner object literal node.","author":{"url":"https://github.com/Yogu","@type":"Person","name":"Yogu"},"datePublished":"2017-06-27T13:40:23Z","url":"https://github.com/microsoft/TypeScript/issues/16765"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:582750e4-0ee4-aa76-b64c-469aaeb7e3c1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA7B8:EA09B:7C7EC6:A70F4E:6B00DE7F
html-safe-nonce77256bea4b01f23270db5ce3d278adcaf398e8695b966f3c2b32f1cf45058985
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0I4OkVBMDlCOjdDN0VDNjpBNzBGNEU6NkIwMERFN0YiLCJ2aXNpdG9yX2lkIjoiODYyMDQxMDE3ODQ4OTA4MTQ3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacda02588ee1de07d869a9f39e7a81304e1eafbb3b8d7d9798dc5fe63379699962
hovercard-subject-tagissue:238854701
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/16765/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c8956b42b44a9f317b6319ff96e4fa75f346d02b518e488def155b339ad17039/microsoft/TypeScript/issues/16765
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c8956b42b44a9f317b6319ff96e4fa75f346d02b518e488def155b339ad17039/microsoft/TypeScript/issues/16765
og:image:altTypeScript Version: 2.4.0 compilerOptions.target = ES5 Code const obj = {}; const a = { ...obj, prop() { return { ...obj, metadata: 213 } } }; Expected behavior: It compiles and transpiles the obje...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameYogu
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/16765#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F16765
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F16765
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/16765
Reloadhttps://github.com/microsoft/TypeScript/issues/16765
Reloadhttps://github.com/microsoft/TypeScript/issues/16765
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/16765
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/16765
esnext features not transpiled within method declarations in object literals with spread elementshttps://github.com/microsoft/TypeScript/issues/16765#top
https://github.com/rbuckton
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 2.5.2https://github.com/microsoft/TypeScript/milestone/54
https://github.com/Yogu
Jan Melcher (Yogu)https://github.com/Yogu
on Jun 27, 2017https://github.com/microsoft/TypeScript/issues/16765#issue-238854701
Jan Melcher (Yogu)https://github.com/Yogu
on Jun 27, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1140716667
Jan Melcher (Yogu)https://github.com/Yogu
on Jun 27, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1140736408
Add missing visitNode call to object literal membershttps://github.com/Yogu/TypeScript/commit/577429efea149c4a86581b2e54eee8f599203b4a
https://docs.github.com/articles/closing-issues-via-commit-messages
577429ehttps://github.com/Yogu/TypeScript/commit/577429efea149c4a86581b2e54eee8f599203b4a
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Jun 27, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1140740559
Jan Melcher (Yogu)https://github.com/Yogu
on Jun 27, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1140821623
Add missing visitNode call to object literal membershttps://github.com/Yogu/TypeScript/commit/70c11a89a577b49f2d13cce339c2b5d323d71fa2
https://docs.github.com/articles/closing-issues-via-commit-messages
70c11a8https://github.com/Yogu/TypeScript/commit/70c11a89a577b49f2d13cce339c2b5d323d71fa2
Add test case for nested object spread / methodshttps://github.com/Yogu/TypeScript/commit/fd6591cf05fff613235da91818533e7831e1214f
https://docs.github.com/articles/closing-issues-via-commit-messages
fd6591chttps://github.com/Yogu/TypeScript/commit/fd6591cf05fff613235da91818533e7831e1214f
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
TypeScript 2.5https://github.com/microsoft/TypeScript/milestone/49
on Jun 27, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1140952602
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Accepting PRshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Accepting%20PRs%22
on Jun 28, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1141694575
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
TypeScript 2.5https://github.com/microsoft/TypeScript/milestone/49
on Jun 28, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1141696542
Jan Melcher (Yogu)https://github.com/Yogu
on Jun 28, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1142181415
Add missing visitNode call to object literal membershttps://github.com/Yogu/TypeScript/commit/20a94ec46eb0bb9dad86a91071ac18b90fbc2067
https://docs.github.com/articles/closing-issues-via-commit-messages
20a94echttps://github.com/Yogu/TypeScript/commit/20a94ec46eb0bb9dad86a91071ac18b90fbc2067
Add test case for nested object spread / methodshttps://github.com/Yogu/TypeScript/commit/28c2ad51f23495a27bb16f14ed30951aa91dc24f
https://docs.github.com/articles/closing-issues-via-commit-messages
28c2ad5https://github.com/Yogu/TypeScript/commit/28c2ad51f23495a27bb16f14ed30951aa91dc24f
Add test case for nested object spread / methodshttps://github.com/Yogu/TypeScript/commit/a50660af17c48144bded0a683f463fbb7ee31554
https://docs.github.com/articles/closing-issues-via-commit-messages
a50660ahttps://github.com/Yogu/TypeScript/commit/a50660af17c48144bded0a683f463fbb7ee31554
Jan Melcher (Yogu)https://github.com/Yogu
on Aug 13, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1203885360
Add missing visitNode call to object literal membershttps://github.com/Yogu/TypeScript/commit/903d137cea1dc25556bf2e90fda21f4d416eb72c
https://docs.github.com/articles/closing-issues-via-commit-messages
903d137https://github.com/Yogu/TypeScript/commit/903d137cea1dc25556bf2e90fda21f4d416eb72c
Add test case for nested object spread / methodshttps://github.com/Yogu/TypeScript/commit/8b4db9875d6eb60a243dc7e20fc51c7c04ab569d
https://docs.github.com/articles/closing-issues-via-commit-messages
8b4db98https://github.com/Yogu/TypeScript/commit/8b4db9875d6eb60a243dc7e20fc51c7c04ab569d
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.5https://github.com/microsoft/TypeScript/milestone/49
on Aug 16, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1209160997
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Ron Buckton (rbuckton)https://github.com/rbuckton
on Aug 16, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1209161079
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Aug 17, 2017https://github.com/microsoft/TypeScript/issues/16765#issuecomment-322985235
Ron Buckton (rbuckton)https://github.com/rbuckton
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#16767https://github.com/microsoft/TypeScript/pull/16767
on Aug 24, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1218867679
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Aug 24, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1220096692
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.6https://github.com/microsoft/TypeScript/milestone/53
TypeScript 2.5.2https://github.com/microsoft/TypeScript/milestone/54
on Aug 24, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1220097923
Ron Buckton (rbuckton)https://github.com/rbuckton
on Aug 24, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1220258480
Add missing visitNode call to object literal membershttps://github.com/microsoft/TypeScript/commit/09e7e88a1930d080c1147e0a688aeeda324775c3
https://docs.github.com/articles/closing-issues-via-commit-messages
09e7e88https://github.com/microsoft/TypeScript/commit/09e7e88a1930d080c1147e0a688aeeda324775c3
Add test case for nested object spread / methodshttps://github.com/microsoft/TypeScript/commit/d48ac07e146f2c364a103bf439f810a66ac14ae2
https://docs.github.com/articles/closing-issues-via-commit-messages
d48ac07https://github.com/microsoft/TypeScript/commit/d48ac07e146f2c364a103bf439f810a66ac14ae2
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.5.2https://github.com/microsoft/TypeScript/milestone/54
TypeScript 2.6https://github.com/microsoft/TypeScript/milestone/53
on Aug 24, 2017https://github.com/microsoft/TypeScript/issues/16765#event-1220261026
microsofthttps://github.com/microsoft
on Jun 14, 2018https://github.com/microsoft/TypeScript/issues/16765#event-1682144620
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/16765
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/16765
Ron Buckton (rbuckton)https://github.com/rbuckton
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 2.5.2https://github.com/microsoft/TypeScript/milestone/54
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.