We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Version: 3.2.0-dev.20180926
Search Terms:
Code
a.ts
import {} from './sub/b'
sub/b.ts:
sub/b.ts
export const abc =123;
b
Expected behavior: Returned locs should only include the file name segment of the path in a.ts
Actual behavior: Returned locs include the entire import path in a.ts
locs
[Trace - 2:02:28 PM] Response received: rename (180). Request took 2 ms. Success: true Result: { "info": { "canRename": true, "fileToRename": "/Users/matb/projects/san/sub/b.ts", "displayName": "/Users/matb/projects/san/sub/b.ts", "fullDisplayName": "/Users/matb/projects/san/sub/b.ts", "kind": "module", "kindModifiers": "", "triggerSpan": { "start": { "line": 1, "offset": 24 }, "end": { "line": 1, "offset": 25 } } }, "locs": [ { "file": "/Users/matb/projects/san/a.ts", "locs": [ { "start": { "line": 1, "offset": 18 }, "end": { "line": 1, "offset": 25 } } ] } ] }
The text was updated successfully, but these errors were encountered:
If fileToRename is set you should use that instead of locs. triggerSpan tells you the span at the original location.
fileToRename
triggerSpan
Sorry, something went wrong.
Yes you are correct. I was using the api incorrectly but have fixed this on the VS code side
Sorry for the noise
No branches or pull requests
TypeScript Version: 3.2.0-dev.20180926
Search Terms:
Code
a.ts
sub/b.ts
:b
ina.ts
Expected behavior:
Returned locs should only include the file name segment of the path in
a.ts
Actual behavior:
Returned
locs
include the entire import path ina.ts
The text was updated successfully, but these errors were encountered: