Title: Clearly accessible symbol causes inaccessibility error on declaration emit · Issue #21367 · microsoft/TypeScript · GitHub
Open Graph Title: Clearly accessible symbol causes inaccessibility error on declaration emit · Issue #21367 · microsoft/TypeScript
X Title: Clearly accessible symbol causes inaccessibility error on declaration emit · Issue #21367 · microsoft/TypeScript
Description: export const x = Symbol(); export const y = Symbol(); declare function rand(): boolean; export function f() { return rand() ? x : y; } Compile with declaration emit on. Expected: No error, the following declaration file: export declare c...
Open Graph Description: export const x = Symbol(); export const y = Symbol(); declare function rand(): boolean; export function f() { return rand() ? x : y; } Compile with declaration emit on. Expected: No error, the foll...
X Description: export const x = Symbol(); export const y = Symbol(); declare function rand(): boolean; export function f() { return rand() ? x : y; } Compile with declaration emit on. Expected: No error, the foll...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/21367
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Clearly accessible symbol causes inaccessibility error on declaration emit","articleBody":"```ts\r\nexport const x = Symbol();\r\nexport const y = Symbol();\r\ndeclare function rand(): boolean;\r\nexport function f() {\r\n return rand() ? x : y;\r\n}\r\n```\r\n\r\nCompile with declaration emit on.\r\n\r\n**Expected:** No error, the following declaration file:\r\n\r\n```ts\r\nexport declare const x: unique symbol;\r\nexport declare const y: unique symbol;\r\nexport declare function f(): typeof x | typeof y;\r\n```\r\n\r\n**Actual:**\r\n```\r\nerror TS2527: The inferred type of 'f' references an inaccessible 'unique symbol' type. A type annotation is necessary.`\r\n```","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2018-01-23T17:52:59Z","url":"https://github.com/microsoft/TypeScript/issues/21367"}
| 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:77e40dcb-5feb-af41-632c-458e7980a076 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B910:B8CC8:122EED0:18DDF12:6B040AE0 |
| html-safe-nonce | a9158936d30a887bde519115e1c5792e75467a7618830ba42a9f0360cbe29064 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTEwOkI4Q0M4OjEyMkVFRDA6MThEREYxMjo2QjA0MEFFMCIsInZpc2l0b3JfaWQiOiI5MjE4MTI2NjU1MjIxMTQwMTkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 570dbae8f2a71513c261d5cd24b7a66313d685a6e9e0e688b1e5973321104285 |
| hovercard-subject-tag | issue:290934823 |
| 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/21367/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e5fe40a640e349a1d9f26ed07fa90626c209e10ad6224716c0092c3187c6973/microsoft/TypeScript/issues/21367 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e5fe40a640e349a1d9f26ed07fa90626c209e10ad6224716c0092c3187c6973/microsoft/TypeScript/issues/21367 |
| og:image:alt | export const x = Symbol(); export const y = Symbol(); declare function rand(): boolean; export function f() { return rand() ? x : y; } Compile with declaration emit on. Expected: No error, the foll... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width