Skip to content

Commit cc5dd5b

Browse files
committed
Add comments
1 parent 9027da4 commit cc5dd5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/services.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4164,12 +4164,15 @@ namespace ts {
41644164

41654165
const argumentInfo = SignatureHelp.getContainingArgumentInfo(node, position, sourceFile);
41664166
if (argumentInfo) {
4167+
// Get string literal completions from specialized signatures of the target
41674168
return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo);
41684169
}
41694170
else if (isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
4171+
// Get all names of properties on the expression
41704172
return getStringLiteralCompletionEntriesFromElementAccess(node.parent);
41714173
}
41724174
else {
4175+
// Otherwise, get the completions from the contextual type if one exists
41734176
return getStringLiteralCompletionEntriesFromContextualType(<StringLiteral>node);
41744177
}
41754178
}

0 commit comments

Comments
 (0)