Skip to content

Commit dbfdb96

Browse files
Add explanatory comment
1 parent 9560895 commit dbfdb96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/services.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6050,6 +6050,10 @@ module ts {
60506050
if (node && textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) {
60516051
if (node.kind === SyntaxKind.Identifier && !nodeIsMissing(node)) {
60526052
let identifier = <Identifier>node;
6053+
6054+
// Only bother calling into the typechecker if this is an identifier that
6055+
// could possibly resolve to a type name. This makes classification run
6056+
// in a third of the time it would normally take.
60536057
if (typeNames[identifier.text]) {
60546058
let symbol = typeChecker.getSymbolAtLocation(node);
60556059
if (symbol) {

0 commit comments

Comments
 (0)