Title: Relative path reference for declaration · Issue #26439 · microsoft/TypeScript · GitHub
Open Graph Title: Relative path reference for declaration · Issue #26439 · microsoft/TypeScript
X Title: Relative path reference for declaration · Issue #26439 · microsoft/TypeScript
Description: TypeScript Version: 3.1.0-dev.20180813 Also can be reproduced in version 3.0.1 Search Terms: declaration, reference, lodash Code I was trying to migrate from 2.7.2 version to 3.0.1 and getting this behavior in 3.0.1. Here I am using loda...
Open Graph Description: TypeScript Version: 3.1.0-dev.20180813 Also can be reproduced in version 3.0.1 Search Terms: declaration, reference, lodash Code I was trying to migrate from 2.7.2 version to 3.0.1 and getting this...
X Description: TypeScript Version: 3.1.0-dev.20180813 Also can be reproduced in version 3.0.1 Search Terms: declaration, reference, lodash Code I was trying to migrate from 2.7.2 version to 3.0.1 and getting this...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26439
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Relative path reference for declaration","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.1.0-dev.20180813\r\nAlso can be reproduced in version 3.0.1\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\ndeclaration, reference, lodash\r\n**Code**\r\nI was trying to migrate from `2.7.2` version to `3.0.1` and getting this behavior in `3.0.1`.\r\nHere I am using lodash:\r\n```ts\r\nimport PropTypes from 'prop-types';\r\nimport { has, difference, entries, each, set } from 'lodash';\r\n```\r\nAnd after I ran `tsc` compiler this declaration will be generated:\r\n\r\n```ts\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/common.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/array.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/collection.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/date.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/function.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/lang.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/math.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/number.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/object.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/seq.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/string.d.ts\" />\r\n/// \u003creference path=\"../../../../node_modules/@types/lodash/common/util.d.ts\" />\r\nimport PropTypes from 'prop-types';\r\n```\r\nSo than I can't use this declaration in another project. Everything works good in `2.7.2` version\r\nHere is my `tsconfig.json`:\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"target\": \"es5\",\r\n \"module\": \"commonjs\",\r\n \"declaration\": true,\r\n \"strict\": true,\r\n \"sourceMap\": true,\r\n \"esModuleInterop\": true,\r\n \"allowSyntheticDefaultImports\": true,\r\n \"importHelpers\": true,\r\n \"jsx\": \"react\",\r\n \"lib\": [\r\n \"es5\",\r\n \"es2015\",\r\n \"es6\",\r\n \"es2016\",\r\n \"dom\"\r\n ],\r\n \"removeComments\": true,\r\n \"preserveConstEnums\": true,\r\n \"experimentalDecorators\": true,\r\n \"rootDir\": \"./src\",\r\n \"outDir\": \"build/dist\",\r\n \"strictNullChecks\": false,\r\n \"pretty\": true,\r\n \"noErrorTruncation\": true\r\n },\r\n \"include\": [\r\n \"./types/global.d.ts\",\r\n \"./types/is_js.d.ts\",\r\n \"./types/redux-api-middleware.d.ts\",\r\n \"./types/moment-duration-format.d.ts\",\r\n \"./types/text-size.d.ts\",\r\n \"src/**/*.ts\",\r\n \"src/**/*.tsx\"\r\n ],\r\n \"exclude\": [\r\n \"node_modules\",\r\n \"**/*.spec.ts\"\r\n ]\r\n}\r\n```\r\n","author":{"url":"https://github.com/denl95","@type":"Person","name":"denl95"},"datePublished":"2018-08-14T11:45:01Z","url":"https://github.com/microsoft/TypeScript/issues/26439"}
| 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:a1d15568-adc4-1146-7f54-9f3c402918db |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC4A:2B4064:23102D:306571:6B046881 |
| html-safe-nonce | a3c5baa9f8664a8f2faa633a583572fbe734deb2131ca56b8794661c0db45ff5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzRBOjJCNDA2NDoyMzEwMkQ6MzA2NTcxOjZCMDQ2ODgxIiwidmlzaXRvcl9pZCI6IjgwMDQ2ODk1MDgwOTAyNzU5NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 89a43589213e17e494b9a98f0313011b2c0af18d92a6bdbe6b493c9178370156 |
| hovercard-subject-tag | issue:350393001 |
| 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/26439/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55f0225bf3444ce4933151bac5a618c08c650f9fce8888de7f6bc43ca9693510/microsoft/TypeScript/issues/26439 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55f0225bf3444ce4933151bac5a618c08c650f9fce8888de7f6bc43ca9693510/microsoft/TypeScript/issues/26439 |
| og:image:alt | TypeScript Version: 3.1.0-dev.20180813 Also can be reproduced in version 3.0.1 Search Terms: declaration, reference, lodash Code I was trying to migrate from 2.7.2 version to 3.0.1 and getting this... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | denl95 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| 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 | ca4d07a7cef4e4b75f821dc25e7300d80c1450a9 |
| 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