Title: Compiler gives unhelpful error messages in the presence of multiple default exports · Issue #3886 · microsoft/TypeScript · GitHub
Open Graph Title: Compiler gives unhelpful error messages in the presence of multiple default exports · Issue #3886 · microsoft/TypeScript
X Title: Compiler gives unhelpful error messages in the presence of multiple default exports · Issue #3886 · microsoft/TypeScript
Description: export default class foo { } export default function bar() { } var x = 10; export default x; In the above example, the error messages are: On foo: "Duplicate identifier 'foo'." On bar: "Duplicate identifier 'bar'." On export default x: "...
Open Graph Description: export default class foo { } export default function bar() { } var x = 10; export default x; In the above example, the error messages are: On foo: "Duplicate identifier 'foo'." On bar: "Duplicate i...
X Description: export default class foo { } export default function bar() { } var x = 10; export default x; In the above example, the error messages are: On foo: "Duplicate identifier 'foo'." On...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/3886
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Compiler gives unhelpful error messages in the presence of multiple default exports ","articleBody":"``` TypeScript\nexport default class foo {\n\n}\n\nexport default function bar() {\n\n}\n\nvar x = 10;\nexport default x;\n```\n\nIn the above example, the error messages are:\n1. On `foo`: \"Duplicate identifier 'foo'.\"\n2. On `bar`: \"Duplicate identifier 'bar'.\"\n3. On `export default x`: \"Duplicate identifier 'default'.\"\n\nThen we have...\n\n``` TypeScript\nexport default function foo() {\n\n}\n\nexport default function bar() {\n\n}\n```\n1. On `foo`: \"Duplicate function implementation.\"\n2. On `bar`: \"Duplicate function implementation.\"\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2015-07-16T00:12:15Z","url":"https://github.com/microsoft/TypeScript/issues/3886"}
| 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:0b65ac72-09b7-b4c4-7c9b-de01fecc381b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D00:2C69FC:926A2:C2C6A:6B018130 |
| html-safe-nonce | 3b9ca67331fe8b0e60d3fa7c6e1f795a6c24c1d692855a1735f44d5eb70e358c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDAwOjJDNjlGQzo5MjZBMjpDMkM2QTo2QjAxODEzMCIsInZpc2l0b3JfaWQiOiI3NjA4NTUzNTQ2MTE5NzQxNzQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 94349e65d11f0fe318406e0ff536af0a9a4024d0dee5643636cbf753d03de018 |
| hovercard-subject-tag | issue:95317520 |
| 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/3886/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c11e9ed18eaffc4b8403edab4785ce059ca72a3405ca873b4cc1eac4d3b476dd/microsoft/TypeScript/issues/3886 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c11e9ed18eaffc4b8403edab4785ce059ca72a3405ca873b4cc1eac4d3b476dd/microsoft/TypeScript/issues/3886 |
| og:image:alt | export default class foo { } export default function bar() { } var x = 10; export default x; In the above example, the error messages are: On foo: "Duplicate identifier 'foo'." On bar: "Duplicate i... |
| 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 | 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