{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/25769","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/25769/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/25769/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/25769/events","html_url":"https://github.com/Microsoft/TypeScript/issues/25769","id":342367242,"node_id":"MDU6SXNzdWUzNDIzNjcyNDI=","number":25769,"title":"Wrong import path on \"relaxed\" declaration file","user":{"login":"netanelgilad","id":3474905,"node_id":"MDQ6VXNlcjM0NzQ5MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/3474905?v=4","gravatar_id":"","url":"https://api.github.com/users/netanelgilad","html_url":"https://github.com/netanelgilad","followers_url":"https://api.github.com/users/netanelgilad/followers","following_url":"https://api.github.com/users/netanelgilad/following{/other_user}","gists_url":"https://api.github.com/users/netanelgilad/gists{/gist_id}","starred_url":"https://api.github.com/users/netanelgilad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netanelgilad/subscriptions","organizations_url":"https://api.github.com/users/netanelgilad/orgs","repos_url":"https://api.github.com/users/netanelgilad/repos","events_url":"https://api.github.com/users/netanelgilad/events{/privacy}","received_events_url":"https://api.github.com/users/netanelgilad/received_events","type":"User","site_admin":false},"labels":[{"id":113971226,"node_id":"MDU6TGFiZWwxMTM5NzEyMjY=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Duplicate","name":"Duplicate","color":"f7c6c7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-07-18T14:59:55Z","updated_at":"2018-07-30T16:23:04Z","closed_at":"2018-07-30T16:23:04Z","author_association":"NONE","body":"<!-- 🚨 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<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  2.9.2\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\nwrong import declaration file\r\nimport relative to root\r\n\r\n**Code**\r\n\r\n[A link to a repo for reproduction](https://github.com/netanelgilad/typescript-declaration-import-bug)\r\n\r\n```ts\r\n// Check.ts\r\nexport type Inner = {\r\n    something: number;\r\n}\r\n```\r\n\r\n```ts\r\n// Another.ts\r\nimport {  Inner } from './Check';\r\n\r\nexport function foo(): Inner {\r\n    return {\r\n        something: 1\r\n    };\r\n}\r\n```\r\n\r\n```ts\r\n// index.ts\r\nimport { foo } from './Another';\r\n\r\nexport function bar() {\r\n    return foo();\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nDeclaration file for index.d.ts should be\r\n```ts\r\nexport declare function bar(): import(\"./Check\").Inner;\r\n```\r\n\r\n**Actual behavior:**\r\n\r\nDeclaration file for index.d.ts is\r\n```ts\r\nexport declare function bar(): import(\"../../../../../Users/netanelgilad/Development/typescript-declaration-import-bug/src/Check\").Inner;\r\n```\r\n\r\n**Related Issues:** <!-- Did you find other bugs that looked similar? -->\r\nN/A\r\n\r\nSo I encountered this issue with typescript@2.9.2. I did a few checks with different versions. using typescript@next or typescript@2.9.1, this works fine. I don't know what your strategy for supporting version 2 of TypeScript, but since the next version of TypeScript is a major release, I would rather not upgrade to it until I feel it has stabilized and there are not breaking changes that affect my projects. Will you consider fixing this in 2.9 release line of TypeScript? It would be greatly appreciated. "}}
{"actor":{"display_login":"typescript-bot"}}