Title: createDiagnosticCollection should be @internal, or DiagnosticCollection should not be · Issue #2268 · microsoft/TypeScript · GitHub
Open Graph Title: createDiagnosticCollection should be @internal, or DiagnosticCollection should not be · Issue #2268 · microsoft/TypeScript
X Title: createDiagnosticCollection should be @internal, or DiagnosticCollection should not be · Issue #2268 · microsoft/TypeScript
Description: Generated definitions in bin/typescriptServices_internal.d.ts are invalid, causing compilation error if used: typescriptServices_internal.d.ts 2304 272:43 Cannot find name 'DiagnosticCollection' declare module ts { // ... function create...
Open Graph Description: Generated definitions in bin/typescriptServices_internal.d.ts are invalid, causing compilation error if used: typescriptServices_internal.d.ts 2304 272:43 Cannot find name 'DiagnosticCollection' de...
X Description: Generated definitions in bin/typescriptServices_internal.d.ts are invalid, causing compilation error if used: typescriptServices_internal.d.ts 2304 272:43 Cannot find name 'DiagnosticCollection...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2268
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"createDiagnosticCollection should be @internal, or DiagnosticCollection should not be","articleBody":"Generated definitions in [bin/typescriptServices_internal.d.ts](https://github.com/Microsoft/TypeScript/blob/f351916fc203b19e3cef062c6ff3e77a368f89e7/bin/typescriptServices_internal.d.ts#L273) are invalid, causing compilation error if used:\n\ntypescriptServices_internal.d.ts 2304 @272:43 Cannot find name 'DiagnosticCollection'\n\n``` typescript\ndeclare module ts {\n // ...\n function createDiagnosticCollection(): DiagnosticCollection;\n```\n\nThis is because DiagnosticCollection is defined with @internal flag in [src/compiler/types.ts](https://github.com/Microsoft/TypeScript/blob/c6cd57d18c85e59b2fbe9d316725748a0af8ac2b/src/compiler/types.ts#L1761):\n\n``` typescript\nmodule ts {\n // ...\n\n // @internal\n export interface DiagnosticCollection {\n // Adds a diagnostic to this diagnostic collection.\n add(diagnostic: Diagnostic): void;\n\n // Gets all the diagnostics that aren't associated with a file.\n getGlobalDiagnostics(): Diagnostic[];\n\n // If fileName is provided, gets all the diagnostics associated with that file name.\n // Otherwise, returns all the diagnostics (global and file associated) in this colletion.\n getDiagnostics(fileName?: string): Diagnostic[];\n\n // Gets a count of how many times this collection has been modified. This value changes\n // each time 'add' is called (regardless of whether or not an equivalent diagnostic was\n // already in the collection). As such, it can be used as a simple way to tell if any\n // operation caused diagnostics to be returned by storing and comparing the return value \n // of this method before/after the operation is performed.\n getModificationCount(): number;\n }\n```\n\nThe interface looks internal enough, so I guess ts.createDiagnosticCollection() function should go under the internal flag together with the interface.\n\nAlso there need to be tests for the validity of all the generated d.ts files, shouldn't there?\n","author":{"url":"https://github.com/mihailik","@type":"Person","name":"mihailik"},"datePublished":"2015-03-09T10:41:40Z","url":"https://github.com/microsoft/TypeScript/issues/2268"}
| 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:52415ab2-1467-111e-62ab-98b2344167df |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A78:23CF06:6FE0AA:926876:6B00D447 |
| html-safe-nonce | b59b38c2a5e9c168e240059c8d4e95c6cf20bbf7ee870df90cadce3a4d73d74c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTc4OjIzQ0YwNjo2RkUwQUE6OTI2ODc2OjZCMDBENDQ3IiwidmlzaXRvcl9pZCI6Ijg2MDU2NDEzOTIyNzU5MDM1NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4540bdaa237e7a00a41f904eadfb62b7b1b0070aa6b1aa27aa04c4f1180116eb |
| hovercard-subject-tag | issue:60325343 |
| 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/2268/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de979ec9fdefb3c839982c4801605c72f12e2974d08079402285092b79f0798e/microsoft/TypeScript/issues/2268 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de979ec9fdefb3c839982c4801605c72f12e2974d08079402285092b79f0798e/microsoft/TypeScript/issues/2268 |
| og:image:alt | Generated definitions in bin/typescriptServices_internal.d.ts are invalid, causing compilation error if used: typescriptServices_internal.d.ts 2304 272:43 Cannot find name 'DiagnosticCollection' de... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mihailik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| 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 | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width