mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-05 16:54:54 -05:00
quick fix of indexed access type (#20956)
This commit is contained in:
committed by
Mohamed Hegazy
parent
0427d0a72b
commit
2ea5f58d60
@@ -21,7 +21,7 @@ namespace ts.codefix {
|
||||
});
|
||||
|
||||
function getQualifiedName(sourceFile: SourceFile, pos: number): QualifiedName & { left: Identifier } | undefined {
|
||||
const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos, /*includeJsDocComment*/ false), isQualifiedName)!;
|
||||
const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos, /*includeJsDocComment*/ true), isQualifiedName)!;
|
||||
Debug.assert(!!qualifiedName, "Expected position to be owned by a qualified name.");
|
||||
return isIdentifier(qualifiedName.left) ? qualifiedName as QualifiedName & { left: Identifier } : undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user