Title: Question: top-level interface and ES6 "export default AssignmentExpression" · Issue #2490 · microsoft/TypeScript · GitHub
Open Graph Title: Question: top-level interface and ES6 "export default AssignmentExpression" · Issue #2490 · microsoft/TypeScript
X Title: Question: top-level interface and ES6 "export default AssignmentExpression" · Issue #2490 · microsoft/TypeScript
Description: I see that this works in compiler built from recent sources: export default A; interface A {} According to the ES6 specification, after "export default" we only have three options: class declaration hoistable declaration (i.e., function ...
Open Graph Description: I see that this works in compiler built from recent sources: export default A; interface A {} According to the ES6 specification, after "export default" we only have three options: class declaratio...
X Description: I see that this works in compiler built from recent sources: export default A; interface A {} According to the ES6 specification, after "export default" we only have three options: class ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2490
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Question: top-level interface and ES6 \"export default AssignmentExpression\"","articleBody":"I see that this works in compiler built from recent sources:\n\n```\nexport default A;\ninterface A {}\n```\n\nAccording to the ES6 specification, after \"export default\" we only have three options:\n1) class declaration\n2) hoistable declaration (i.e., function or generator declaration)\n3) AssignmentExpression\n\nIf we treat \"A\" from my example as an AssignmentExpression, then it should work exactly the same way as AssignmentExpression in any other place, e.g. \"var x = A\".\n\nFor \"var x = A\" we reasonably have 'Cannot find name A'.\nBut in my example above, 'A' is resolved.\n\nIt means, that after 'export default' we have something different from an ordinary AssignmentExpression.\n\nAre there some special rules for what can appear after export default in the statement?\nDoes it have a special meaning in case of \"export default Identifier\"?\nThanks!\n","author":{"url":"https://github.com/zhuravlikjb","@type":"Person","name":"zhuravlikjb"},"datePublished":"2015-03-25T15:57:50Z","url":"https://github.com/microsoft/TypeScript/issues/2490"}
| 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:3892b049-5f88-a2ab-ae97-e708892ec3b9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 84E6:16AB79:242DD08:2DFFC05:6B018775 |
| html-safe-nonce | de07a707a722a6a0da64c04ee77b21a72552ea021da601f36a073f32b7febf90 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEU2OjE2QUI3OToyNDJERDA4OjJERkZDMDU6NkIwMTg3NzUiLCJ2aXNpdG9yX2lkIjoiMzAyNjA2MDQ2NzY0NzkwNzcwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b1da1edbf889fd32988afd5d31c874a7e94610247e25a9336c604ceb5321830a |
| hovercard-subject-tag | issue:64305783 |
| 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/2490/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe3acd71612da2f7525ea15dddd4cff09e273c7a458fc2c06a8eb1c3421bd040/microsoft/TypeScript/issues/2490 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe3acd71612da2f7525ea15dddd4cff09e273c7a458fc2c06a8eb1c3421bd040/microsoft/TypeScript/issues/2490 |
| og:image:alt | I see that this works in compiler built from recent sources: export default A; interface A {} According to the ES6 specification, after "export default" we only have three options: class declaratio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zhuravlikjb |
| 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