Title: Path mappings have unintuitive behavior if user accidentally adds an extension · Issue #12098 · microsoft/TypeScript · GitHub
Open Graph Title: Path mappings have unintuitive behavior if user accidentally adds an extension · Issue #12098 · microsoft/TypeScript
X Title: Path mappings have unintuitive behavior if user accidentally adds an extension · Issue #12098 · microsoft/TypeScript
Description: Was with Zhengbo Li (@zhengbli) when we hit the following: tsconfig.json: { "compilerOptions": { "baseUrl": ".", "paths": { "foo": ["foo.ts"] } } } foo.ts export function blah() { } hello.ts: import * as x from "foo"; Right now you'll ge...
Open Graph Description: Was with Zhengbo Li (@zhengbli) when we hit the following: tsconfig.json: { "compilerOptions": { "baseUrl": ".", "paths": { "foo": ["foo.ts"] } } } foo.ts export function blah() { } hello.ts: impor...
X Description: Was with Zhengbo Li (@zhengbli) when we hit the following: tsconfig.json: { "compilerOptions": { "baseUrl": ".", "paths": { "foo": ["foo.ts&qu...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/12098
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Path mappings have unintuitive behavior if user accidentally adds an extension","articleBody":"Was with @zhengbli when we hit the following:\r\n\r\n`tsconfig.json`:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"baseUrl\": \".\",\r\n \t\"paths\": {\r\n \"foo\": [\"foo.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n`foo.ts`\r\n\r\n```ts\r\nexport function blah() { }\r\n```\r\n\r\n`hello.ts`:\r\n\r\n```ts\r\nimport * as x from \"foo\";\r\n```\r\n\r\nRight now you'll get an error on the import that `foo` couldn't be resolved.\r\n\r\nEven the documentation currently states (incorrectly) that this should be a valid (though the website isn't up to date). Perhaps we should allow users to specify the extension.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2016-11-08T02:10:27Z","url":"https://github.com/microsoft/TypeScript/issues/12098"}
| 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:cc1af0c6-b2b5-4f52-eea2-381d7781ae7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1E6:1220A:959A3A:C9E2D8:6B04DAFC |
| html-safe-nonce | fb71df58920c473b0a4be521821f28ecb86ad724ff7877ebf8f236dea4659683 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUU2OjEyMjBBOjk1OUEzQTpDOUUyRDg6NkIwNERBRkMiLCJ2aXNpdG9yX2lkIjoiODMzNDI4Mjg2MzEzODg4ODQ0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | deae420850a0baa8e007092e061273c42f2e0707985582cc89f6a6e55a2a6f54 |
| hovercard-subject-tag | issue:187883352 |
| 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/12098/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bc19ac060c1ec2ec26969db8a5e2edb52bb6aeef862db93a3ac7e1a12a6d6af3/microsoft/TypeScript/issues/12098 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bc19ac060c1ec2ec26969db8a5e2edb52bb6aeef862db93a3ac7e1a12a6d6af3/microsoft/TypeScript/issues/12098 |
| og:image:alt | Was with Zhengbo Li (@zhengbli) when we hit the following: tsconfig.json: { "compilerOptions": { "baseUrl": ".", "paths": { "foo": ["foo.ts"] } } } foo.ts export function blah() { } hello.ts: impor... |
| 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 | 194dacb8acfd3e4d3ffb2704e0b1f10327f0dad690a7142acc7b0e0a2d073965 |
| 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 | 6c35540a0a2991ee20bd053ba2601cce33f72cb1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width