Title: Support shorthand ambient module declarations and wildcard chars in module names · Issue #6615 · microsoft/TypeScript · GitHub
Open Graph Title: Support shorthand ambient module declarations and wildcard chars in module names · Issue #6615 · microsoft/TypeScript
X Title: Support shorthand ambient module declarations and wildcard chars in module names · Issue #6615 · microsoft/TypeScript
Description: follow up on #6614 Related issues: #247 (comment), #5787, #2709, #6371 (comment) Problems: Can not easily specify a loader extension for json or css (e.g. `json!a.json); currently every resources needs to have its own declaration Problem...
Open Graph Description: follow up on #6614 Related issues: #247 (comment), #5787, #2709, #6371 (comment) Problems: Can not easily specify a loader extension for json or css (e.g. `json!a.json); currently every resources n...
X Description: follow up on #6614 Related issues: #247 (comment), #5787, #2709, #6371 (comment) Problems: Can not easily specify a loader extension for json or css (e.g. `json!a.json); currently every resources n...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6615
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support shorthand ambient module declarations and wildcard chars in module names","articleBody":"follow up on https://github.com/Microsoft/TypeScript/issues/6614\n\nRelated issues: https://github.com/Microsoft/TypeScript/issues/247#issuecomment-173649104, https://github.com/Microsoft/TypeScript/issues/5787, https://github.com/Microsoft/TypeScript/issues/2709, https://github.com/Microsoft/TypeScript/issues/6371#issuecomment-169597919\n#### Problems:\n- Can not easily specify a loader extension for json or css (e.g. `json!a.json); currently every resources needs to have its own declaration\n- Problem with migrating to .ts, with modules that do not have typings, and users just want to get by\n#### Proposal:\n- Allow for short hand module declarations:\n \n ``` ts\n declare module \"foo\";\n ```\n \n to be equivalent to:\n \n ``` ts\n declare module \"foo\" {\n var _temp: any;\n export = _temp;\n }\n ```\n- Allow module names to have a wildcard character and match that in lookup\n \n ``` ts\n declare module \"json!*\" {\n let json: any;\n export default json;\n }\n \n import d from \"json!a/b/bar.json\";\n // lookup:\n // json!a/b/bar.json\n // json!*\n ```\n- Additional the module \"*\" would allow for matching all unknown modules in the system, which can be used as a way to suppress all missing module errors\n \n ``` ts\n \n declare module \"*\";\n \n import d from \"some\\unknown\\module\"; // no error, d is any\n ```\n- Report no-implicit-any errors for modules declared using the shorthand notion\n Open issue: is this reported on declaration or use sites\n","author":{"url":"https://github.com/mhegazy","@type":"Person","name":"mhegazy"},"datePublished":"2016-01-25T20:14:06Z","url":"https://github.com/microsoft/TypeScript/issues/6615"}
| 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:2f687556-5c19-6e00-5b26-506906359826 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B548:24E4B4:1E9694E:296161E:6AFBA2EC |
| html-safe-nonce | f49fc287919fb428266f6a545340672d5a3da800857eeff2ac17ed9f1c4be37e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTQ4OjI0RTRCNDoxRTk2OTRFOjI5NjE2MUU6NkFGQkEyRUMiLCJ2aXNpdG9yX2lkIjoiNjg3MzgyOTE2MzEyODMwMDI2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7a8bdbd65b3f7adf0e0f7dfe1f7ec8da3da7cf20614ca77c5e0700dd74799b76 |
| hovercard-subject-tag | issue:128627381 |
| 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/6615/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5bea29bfb4e423c7051097be457b27343adc3732139f5d9cb3fbc5fc14266815/microsoft/TypeScript/issues/6615 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5bea29bfb4e423c7051097be457b27343adc3732139f5d9cb3fbc5fc14266815/microsoft/TypeScript/issues/6615 |
| og:image:alt | follow up on #6614 Related issues: #247 (comment), #5787, #2709, #6371 (comment) Problems: Can not easily specify a loader extension for json or css (e.g. `json!a.json); currently every resources n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mhegazy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 03e5090f0cea887cafa036e3af34d7c668d83b5e9e9e03df72a90efb49b69cdf |
| 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 | 41f00295b9a35dca977890ab83b22788ab211dc8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width