Title: Find All Reference from requiring file to module file works only if not default CommonJS exports · Issue #22222 · microsoft/TypeScript · GitHub
Open Graph Title: Find All Reference from requiring file to module file works only if not default CommonJS exports · Issue #22222 · microsoft/TypeScript
X Title: Find All Reference from requiring file to module file works only if not default CommonJS exports · Issue #22222 · microsoft/TypeScript
Description: From Hoishin on February 28, 2018 4:58 By "default CommonJS exports" I mean module.exports = something, rather than module.exports.foo = something or module.exports = {foo: something} Might belong to microsoft/vscode#21507, but I thought...
Open Graph Description: From Hoishin on February 28, 2018 4:58 By "default CommonJS exports" I mean module.exports = something, rather than module.exports.foo = something or module.exports = {foo: something} Might belong ...
X Description: From Hoishin on February 28, 2018 4:58 By "default CommonJS exports" I mean module.exports = something, rather than module.exports.foo = something or module.exports = {foo: something} Mig...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/22222
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Find All Reference from requiring file to module file works only if not default CommonJS exports","articleBody":"_From @Hoishin on February 28, 2018 4:58_\n\n> By \"default CommonJS exports\" I mean `module.exports = something`, rather than `module.exports.foo = something` or `module.exports = {foo: something}`\r\n\r\nMight belong to https://github.com/Microsoft/vscode/issues/21507, but I thought it is a bit different.\r\n\r\n- VSCode Version: 1.20.1\r\n- OS Version: macOS High Sierra Version 10.13.3\r\n\r\nSteps to Reproduce:\r\n\r\n1. `module.exports` something\r\n```js\r\nconst f = 1234;\r\nmodule.exports = f;\r\n```\r\n2. `require` it\r\n```js\r\nconst f = require('./above-file');\r\nconsole.log(f);\r\n```\r\n3. The `f` in `console.log` doesn't show references across files in Find All References. You can find references across files if you Find All References from the module file.\r\n\r\nHowever,\r\n1. `module.exports.foo` something\r\n```js\r\nconst f = 1234;\r\nmodule.exports.foo = f;\r\n```\r\n2. `require` it\r\n```js\r\nconst {foo} = require('./above-file');\r\nconsole.log(foo);\r\n```\r\n3. The `foo` in `console.log` DOES show reference across files in Find All References. You can find references across files if you Find All References from the module file.\r\n\r\n\u003c!-- Launch with `code --disable-extensions` to check. -->\r\nDoes this issue occur when all extensions are disabled?: Yes\r\n\n\n_Copied from original issue: Microsoft/vscode#44700_","author":{"url":"https://github.com/mjbvz","@type":"Person","name":"mjbvz"},"datePublished":"2018-02-28T09:00:44Z","url":"https://github.com/microsoft/TypeScript/issues/22222"}
| 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:d7a40ecf-3fd8-e10a-cd86-78cf6ad882a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA12:2E7EBB:29A006C:34A3E9B:6B019BEC |
| html-safe-nonce | da27a73c1c4462c83a871f1ee5e1274c07a81fb7d0ca2a44650581be84ff1d05 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTEyOjJFN0VCQjoyOUEwMDZDOjM0QTNFOUI6NkIwMTlCRUMiLCJ2aXNpdG9yX2lkIjoiNDQ0MjY1NDU4NDQwMTQwMjg2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d2da855e2be014118b8099f19c31c37e5e52b02a65bb3ed1adb42aaa515411ce |
| hovercard-subject-tag | issue:300941129 |
| 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/22222/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cef82195813c692dd2786b13a26be062840b1e4b1f9878fe0c9130743f8a9e04/microsoft/TypeScript/issues/22222 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cef82195813c692dd2786b13a26be062840b1e4b1f9878fe0c9130743f8a9e04/microsoft/TypeScript/issues/22222 |
| og:image:alt | From Hoishin on February 28, 2018 4:58 By "default CommonJS exports" I mean module.exports = something, rather than module.exports.foo = something or module.exports = {foo: something} Might belong ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mjbvz |
| 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