mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
support goto def on /// references with absolute path
This commit is contained in:
@@ -2573,7 +2573,8 @@ module ts {
|
||||
/// Triple slash reference comments
|
||||
var comment = forEach(sourceFile.referencedFiles, r => (r.pos <= position && position < r.end) ? r : undefined);
|
||||
if (comment) {
|
||||
var targetFilename = normalizePath(combinePaths(getDirectoryPath(filename), comment.filename));
|
||||
var targetFilename = isRootedDiskPath(comment.filename) ? comment.filename : combinePaths(getDirectoryPath(filename), comment.filename);
|
||||
targetFilename = normalizePath(targetFilename);
|
||||
if (program.getSourceFile(targetFilename)) {
|
||||
return [{
|
||||
fileName: targetFilename,
|
||||
|
||||
Reference in New Issue
Block a user