Title: Importing large export assignment object causes Maximum call stack size exceeded · Issue #31824 · microsoft/TypeScript · GitHub
Open Graph Title: Importing large export assignment object causes Maximum call stack size exceeded · Issue #31824 · microsoft/TypeScript
X Title: Importing large export assignment object causes Maximum call stack size exceeded · Issue #31824 · microsoft/TypeScript
Description: TypeScript Version: 3.5.1 Search Terms: import, export assignment, export =, call stack Code This crashes tsc, //npm install --save type-mapping@1.1.2 //`ts-node ./index.ts` works fine //`tsc` gives `Maximum call stack size exceeded` //`...
Open Graph Description: TypeScript Version: 3.5.1 Search Terms: import, export assignment, export =, call stack Code This crashes tsc, //npm install --save type-mapping@1.1.2 //`ts-node ./index.ts` works fine //`tsc` give...
X Description: TypeScript Version: 3.5.1 Search Terms: import, export assignment, export =, call stack Code This crashes tsc, //npm install --save type-mapping@1.1.2 //`ts-node ./index.ts` works fine //`tsc` give...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/31824
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Importing large export assignment object causes Maximum call stack size exceeded","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.5.1\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** import, export assignment, `export =`, call stack\r\n\r\n**Code**\r\n\r\nThis crashes `tsc`,\r\n\r\n```ts\r\n//npm install --save type-mapping@1.1.2\r\n//`ts-node ./index.ts` works fine\r\n//`tsc` gives `Maximum call stack size exceeded`\r\n//`\"type-mapping/fluent\"` is a file that uses `export =`\r\n//to export an object with many properties\r\nimport * as tm from \"type-mapping/fluent\";\r\nconsole.log(tm);\r\n```\r\n\r\nThis works fine,\r\n\r\n```ts\r\n//npm install --save type-mapping@1.1.2\r\n//`ts-node ./index.ts` works fine\r\n//`tsc` also works fine\r\n//`\"type-mapping\"` is a file that uses `export *`\r\n//to export many objects, even more than \"type-mapping/fluent\"\r\nimport * as tm from \"type-mapping\";\r\nconsole.log(tm);\r\n```\r\n\r\n**Expected behavior:**\r\n\r\n`tsc` should compile fine in both cases.\r\n\r\n`\"type-mapping/fluent\"` uses `export =` to export a single object with many properties (141 properties).\r\n\r\nHowever, the number of \"things\" exported is less than the amount exported\r\nby `\"type-mapping\"`, which uses `export *` (178, excluding interfaces and typedefs).\r\n\r\nSo, this makes me suspect that the problem is `export =`.\r\nHowever, I simply have to use `export =` because `\"type-mapping/fluent\"` is generating these properties during run-time. (During compile-time, the export is a mapped object type)\r\n\r\n**Actual behavior:**\r\n\r\n`Maximum call stack size exceeded` with `\"type-mapping/fluent\"` and `export =`.\r\n\r\nWorks fine with `\"type-mapping\"` and `export *`\r\n\r\n**Related Issues:** Not that I could find\r\n","author":{"url":"https://github.com/AnyhowStep","@type":"Person","name":"AnyhowStep"},"datePublished":"2019-06-08T04:11:32Z","url":"https://github.com/microsoft/TypeScript/issues/31824"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c2d0d0ec-f789-0858-77fc-ee8c4d89e5e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8F0:3DA1E8:8C115E:BA8DFD:6B01B377 |
| html-safe-nonce | c928bf886ce0ba68eebc3c23a196381acf64ada7921197c7e4821722edb208c6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEYwOjNEQTFFODo4QzExNUU6QkE4REZEOjZCMDFCMzc3IiwidmlzaXRvcl9pZCI6IjY3NDYyNjAyMjQ4OTE1MzIxNTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 26389e7222c446e5eb71988eb490be3823d2f279784c858a1aaaf801081f85e6 |
| hovercard-subject-tag | issue:453753477 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/31824/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9d8c39f1724ab723b5d68bedf407a28159b67b8d92cc2e43eda108ab110a9345/microsoft/TypeScript/issues/31824 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9d8c39f1724ab723b5d68bedf407a28159b67b8d92cc2e43eda108ab110a9345/microsoft/TypeScript/issues/31824 |
| og:image:alt | TypeScript Version: 3.5.1 Search Terms: import, export assignment, export =, call stack Code This crashes tsc, //npm install --save type-mapping@1.1.2 //`ts-node ./index.ts` works fine //`tsc` give... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AnyhowStep |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width