Title: Super slow compilation in rare cases when mixing explicit typing, generics and type-inference · Issue #7460 · microsoft/TypeScript · GitHub
Open Graph Title: Super slow compilation in rare cases when mixing explicit typing, generics and type-inference · Issue #7460 · microsoft/TypeScript
X Title: Super slow compilation in rare cases when mixing explicit typing, generics and type-inference · Issue #7460 · microsoft/TypeScript
Description: TypeScript Version: 1.8.7 Code Having three classes like this: import {Subject} from 'rxjs/Rx'; import {Task} from '../../models/task' import {TaskStore} from "../task-store/task-store"; export class TaskService { //foo = "bar"; // -> co...
Open Graph Description: TypeScript Version: 1.8.7 Code Having three classes like this: import {Subject} from 'rxjs/Rx'; import {Task} from '../../models/task' import {TaskStore} from "../task-store/task-store"; export cla...
X Description: TypeScript Version: 1.8.7 Code Having three classes like this: import {Subject} from 'rxjs/Rx'; import {Task} from '../../models/task' import {TaskStore} from "../task-store/ta...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/7460
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Super slow compilation in rare cases when mixing explicit typing, generics and type-inference","articleBody":"**TypeScript Version:** \n\n1.8.7\n\n**Code**\n\nHaving three classes like this:\n\n``` ts\n\nimport {Subject} from 'rxjs/Rx';\nimport {Task} from '../../models/task'\nimport {TaskStore} from \"../task-store/task-store\";\n\nexport class TaskService {\n //foo = \"bar\"; // -> commenting in solves slow compilation\n tasks: Subject\u003cTask[]>;\n}\n\n```\n\n``` ts\n\nimport {Task} from \"../../models/task\";\nimport {BehaviorSubject} from \"rxjs/Rx\";\n\nexport class TaskStore {\n tasks = new BehaviorSubject([]);\n //tasks = new BehaviorSubject\u003cTask[]>([]); // -> change above line withis this one solves slow compilation\n //_tasks = new BehaviorSubject([]); // -> change above line withis this one solves slow compilation\n}\n\n```\n\n```\nimport {bootstrap} from 'angular2/platform/browser';\nimport {TaskStore} from \"./app/services/task-store/task-store\";\nimport {TaskService} from './app/services/task-service/task-service';\n\nclass TestClass {\n}\n\nbootstrap(TestClass, [\n TaskService,\n TaskStore,\n]);\n\n```\n\nleads to super slow compilation. Commenting in any of the lines above makes the compilation about 6 times faster. \n\nSee this repositiory as a reference for the problem:\n\nhttps://github.com/choeller/slow-ts-compiler-demo/\n","author":{"url":"https://github.com/choeller","@type":"Person","name":"choeller"},"datePublished":"2016-03-10T14:49:49Z","url":"https://github.com/microsoft/TypeScript/issues/7460"}
| 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:fc97abbf-e3a5-00e3-a791-5667f2af0351 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8716:62283:AF8058:EA6365:6B00ED57 |
| html-safe-nonce | ac68333d153790f49ad0490d6f6831ddcaeca14ab032f29b1516497ae81b9626 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzE2OjYyMjgzOkFGODA1ODpFQTYzNjU6NkIwMEVENTciLCJ2aXNpdG9yX2lkIjoiMTM2NjUwMzM5NjczOTE4MTkxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9b09c758cd9df1504c3252983bd891b8ef55cb16ddcb7f1bcbd4cd4c331ad45a |
| hovercard-subject-tag | issue:139909600 |
| 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/7460/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68461c55603933465de007c3ddfed32984d7cfa5da7c51b7df35c85ec8cd8cde/microsoft/TypeScript/issues/7460 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68461c55603933465de007c3ddfed32984d7cfa5da7c51b7df35c85ec8cd8cde/microsoft/TypeScript/issues/7460 |
| og:image:alt | TypeScript Version: 1.8.7 Code Having three classes like this: import {Subject} from 'rxjs/Rx'; import {Task} from '../../models/task' import {TaskStore} from "../task-store/task-store"; export cla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | choeller |
| 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