Skip to content

Commit e31aa9e

Browse files
committed
Added more comments and todos as per code review feedback
1 parent 0e76a82 commit e31aa9e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/compiler/checker.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,20 @@ module ts {
711711
return { accessibility: SymbolAccessibility.Accessible };
712712
}
713713

714+
// TODO(shkamat): Handle static method of class
715+
716+
// If we havent got the accessible symbol doesnt mean the symbol is actually inaccessible.
717+
// It could be qualified symbol and hence verify the path
718+
// eg:
719+
// module m {
720+
// export class c {
721+
// }
722+
// }
723+
// var x: typeof m.c
724+
// In the above example when we start with checking if typeof m.c symbol is accessible,
725+
// we are going to see if c can be accessed in scope directly.
726+
// But it cant, hence the accessible is going to be undefined, but that doesnt mean m.c is accessible
727+
// It is accessible if the parent m is accessible because then m.c can be accessed through qualification
714728
meaningToLook = SymbolFlags.Namespace;
715729
symbol = symbol.parent;
716730
}

0 commit comments

Comments
 (0)