Title: Allow importing directories with index.ts files as relative external modules. · Issue #207 · microsoft/TypeScript · GitHub
Open Graph Title: Allow importing directories with index.ts files as relative external modules. · Issue #207 · microsoft/TypeScript
X Title: Allow importing directories with index.ts files as relative external modules. · Issue #207 · microsoft/TypeScript
Description: Hi there, ├ foo/ │ └ index.ts └ bar/ └ index.ts Assume you have the project structure above, and that you'd like to require the file foo/index.ts, from file bar/index.ts. With the current version of TypeScript you must use the import foo...
Open Graph Description: Hi there, ├ foo/ │ └ index.ts └ bar/ └ index.ts Assume you have the project structure above, and that you'd like to require the file foo/index.ts, from file bar/index.ts. With the current version o...
X Description: Hi there, ├ foo/ │ └ index.ts └ bar/ └ index.ts Assume you have the project structure above, and that you'd like to require the file foo/index.ts, from file bar/index.ts. With the current versi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/207
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow importing directories with index.ts files as relative external modules.","articleBody":"Hi there,\n\n```\n├ foo/\n│ └ index.ts\n└ bar/\n └ index.ts\n```\n\nAssume you have the project structure above, and that you'd like to require the file `foo/index.ts`, from file `bar/index.ts`.\n\nWith the current version of TypeScript you must use the \n\n``` typescript\nimport foo = require('../foo/index')\n```\n\nCommonJS-based environments like `node` and `browserify` allow you to omit the `index` part, and use just `require('../foo')`. I think it would make sense for the typescript compiler to also allow that. (Considering it does look for `index.ts` in global external modules)\n\nThanks\n","author":{"url":"https://github.com/coreh","@type":"Person","name":"coreh"},"datePublished":"2014-07-23T01:29:26Z","url":"https://github.com/microsoft/TypeScript/issues/207"}
| 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:cb59cd00-79d4-08f2-e36c-0ee218ca9fe1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9E0:27767F:F5ECA:145201:6AFBAF1D |
| html-safe-nonce | e57cfec693ffff2d0d969df8b099dc3639fc8a801381b6f1afc743833ef3bb55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUUwOjI3NzY3RjpGNUVDQToxNDUyMDE6NkFGQkFGMUQiLCJ2aXNpdG9yX2lkIjoiODIzMjI5MDk2MTk1NDk0Mjc0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3ff9abce3d56efe8f90487d5b6174cf33b6fc05ff883c3ae75e181410818d38f |
| hovercard-subject-tag | issue:38476667 |
| 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/207/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec0c30e99da1c2f92bcc0ee8117b9d085ddd9823b8364001356b13308df552b1/microsoft/TypeScript/issues/207 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec0c30e99da1c2f92bcc0ee8117b9d085ddd9823b8364001356b13308df552b1/microsoft/TypeScript/issues/207 |
| og:image:alt | Hi there, ├ foo/ │ └ index.ts └ bar/ └ index.ts Assume you have the project structure above, and that you'd like to require the file foo/index.ts, from file bar/index.ts. With the current version o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | coreh |
| hostname | github.com |
| expected-hostname | github.com |
| None | e25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55 |
| 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 | 08c8f17f9d27054a108b8b6254e405de0151f660 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width