Test for isNewIdentifierLocation, and make true for type with index signature (#22910)

This commit is contained in:
Andy
2018-03-27 13:05:41 -07:00
committed by GitHub
parent ccd6a010e0
commit 21cd68dd04
19 changed files with 35 additions and 32 deletions
+2
View File
@@ -1031,6 +1031,8 @@ namespace ts.Completions {
}
function addTypeProperties(type: Type): void {
isNewIdentifierLocation = !!type.getStringIndexType() || !!type.getNumberIndexType();
if (isSourceFileJavaScript(sourceFile)) {
// In javascript files, for union types, we don't just get the members that
// the individual types have in common, we also include all the members that