Merge pull request #5126 from RyanCavanaugh/noLibSymbolLines

Don't show lib.d.ts line numbers in symbol baselines
This commit is contained in:
Ryan Cavanaugh
2015-10-06 10:00:26 -07:00
482 changed files with 2720 additions and 2718 deletions

View File

@@ -57,7 +57,9 @@ class TypeWriterWalker {
symbolString += ", ";
let declSourceFile = declaration.getSourceFile();
let declLineAndCharacter = declSourceFile.getLineAndCharacterOfPosition(declaration.pos);
symbolString += `Decl(${ ts.getBaseFileName(declSourceFile.fileName) }, ${ declLineAndCharacter.line }, ${ declLineAndCharacter.character })`;
let fileName = ts.getBaseFileName(declSourceFile.fileName);
let isLibFile = /lib(.*)\.d\.ts/i.test(fileName);
symbolString += `Decl(${ fileName }, ${ isLibFile ? "--" : declLineAndCharacter.line }, ${ isLibFile ? "--" : declLineAndCharacter.character })`;
}
}
symbolString += ")";