Skip to content

Commit 6fe8acb

Browse files
committed
added comments
1 parent 956b639 commit 6fe8acb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,10 @@ module ts {
20592059
if (!links.resolvedType) {
20602060
var arrayType = globalArrayType;
20612061
if (!arrayType) {
2062+
// if user code contains augmentation for Array type that includes call\construct signatures with arrays as parameter\return types,
2063+
// then we might step here then during initialization of the global Array type when globalArrayType is not yet set.
2064+
// CODE: interface Array<T> { (): number[] }
2065+
// in this case just resolve name 'Array' again and get declared type of symbol
20622066
var arrayTypeSymbol = resolveName(node, "Array", SymbolFlags.Type, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
20632067
Debug.assert(arrayTypeSymbol);
20642068
arrayType = getDeclaredTypeOfSymbol(arrayTypeSymbol);

0 commit comments

Comments
 (0)