Typescript auto import not using relative path
Answered
Using 2017.1.3. When auto importing types in Typescript,
I expect to get
import {HomeViewModelMapperType} from '../tool/samples/samples.model';
Instead I am getting
import {HomeViewModelMapperType} from 'app/tool/samples/samples.model';
Please sign in to leave a comment.
Hello
Please try selecting "Relative file reference style in 'require'" value in "Relative to root folder" combobox here "ReSharper | Options | Code Editing | TypeScript | Code Style" and then specify a root folder here "ReSharper | Options | Code Editing | TypeScript | Generated Code".
Also there is the following ticket about the similar things for tsconfig.json location https://youtrack.jetbrains.com/issue/RSRP-462922.
Thanks!
The above change does not work. But in my case there is a baseUrl property on the tsconfig.json, once it is removed, everything is working again.
I filed a new request on YouTrack https://youtrack.jetbrains.com/issue/RSRP-465159 for deeper investigation.
Thanks!