Title: Typescript compiler hangs and starts eating memory · Issue #7344 · microsoft/TypeScript · GitHub
Open Graph Title: Typescript compiler hangs and starts eating memory · Issue #7344 · microsoft/TypeScript
X Title: Typescript compiler hangs and starts eating memory · Issue #7344 · microsoft/TypeScript
Description: TypeScript Version: 1.8.0-beta Code return this.http.request(url, request) .catch(initialError => { if (initialError && initialError.status === 401 && isSecureCall === true) { // token might be expired, try to refresh token return me.aut...
Open Graph Description: TypeScript Version: 1.8.0-beta Code return this.http.request(url, request) .catch(initialError => { if (initialError && initialError.status === 401 && isSecureCall === true) { // token might be exp...
X Description: TypeScript Version: 1.8.0-beta Code return this.http.request(url, request) .catch(initialError => { if (initialError && initialError.status === 401 && isSecureCall === true) { //...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/7344
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typescript compiler hangs and starts eating memory","articleBody":"**TypeScript Version:** \n1.8.0-beta\n\n**Code**\n\n```\n return this.http.request(url, request)\n .catch(initialError => {\n if (initialError && initialError.status === 401 && isSecureCall === true) {\n // token might be expired, try to refresh token\n return me.authService.refreshAuthentication().flatMap((authenticationResult:AuthenticationResult) => {\n if (authenticationResult.IsAuthenticated == true) {\n // retry with new token\n me.authService.setAuthorizationHeader(request.headers);\n return this.http.request(url, request);\n }\n return Observable.throw(initialError);\n });\n }\n else {\n return Observable.throw(initialError);\n }\n });\n```\n\n**Expected behavior:**\n\nThis code has compiled and worked before. (this is a snippet from an angular2 application: if an authenticated request fails because the token has expired, the code tries to use a refresh token to get a new token and retry the request).\n\n**Actual behavior:** \n\nThe compiler starts to hang \n\nI have stripped down my project to the bare minimum to illustrate the problem. \nTo reproduce; clone this repo: \n\nhttps://github.com/davyvanlaere/TypescriptCompilerIssue\n\nThen run \"npm install\", followed by \"tsc\": the compiler will hang, and the process \"Evented I/O for V8 Javascript\" will start to eat memory (i let it run for a while and killed it at 1.3gb).\n\nIt has something to do with the types of the return statements. If you the replace 2nd \"return this.http.request(url, request);\" line with \"return Observable.throw(initialError);\", the compiuler will not hang.\n","author":{"url":"https://github.com/davyvanlaere","@type":"Person","name":"davyvanlaere"},"datePublished":"2016-03-02T19:23:00Z","url":"https://github.com/microsoft/TypeScript/issues/7344"}
| 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:80dfd61e-fe5e-c10b-fcbb-ff82f863ba6e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A034:A99C2:BC2F03:F33ABD:6B00E9BC |
| html-safe-nonce | 32cc37d949c9c923e26747d4b17746696c04aa01acfe807c4871b197fb4084bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDM0OkE5OUMyOkJDMkYwMzpGMzNBQkQ6NkIwMEU5QkMiLCJ2aXNpdG9yX2lkIjoiNTYyNjE5MDMzNjcyMTIxNzk4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6c6765a2e7f0b3d8e59e2ab84ffe7322f347872e5be915fa7301e213a2a03c4 |
| hovercard-subject-tag | issue:137966704 |
| 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/7344/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8452070a1031fca4acea67b03441d5d594c179d80a43ba637bd2268ab211c521/microsoft/TypeScript/issues/7344 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8452070a1031fca4acea67b03441d5d594c179d80a43ba637bd2268ab211c521/microsoft/TypeScript/issues/7344 |
| og:image:alt | TypeScript Version: 1.8.0-beta Code return this.http.request(url, request) .catch(initialError => { if (initialError && initialError.status === 401 && isSecureCall === true) { // token might be exp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | davyvanlaere |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width