* It's possible that "prop.valueDeclaration" is a local declaration, but the property was also declared in a superclass. * In that case we won't consider it used before its declaration, because it gets its value from the superclass' declaration.
(prop)
| 74854 | * In that case we won't consider it used before its declaration, because it gets its value from the superclass' declaration. |
| 74855 | */ |
| 74856 | function isPropertyDeclaredInAncestorClass(prop) { |
| 74857 | if (!(prop.parent.flags & 32 /* SymbolFlags.Class */)) { |
| 74858 | return false; |
| 74859 | } |
| 74860 | var classType = getTypeOfSymbol(prop.parent); |
| 74861 | while (true) { |
| 74862 | classType = classType.symbol && getSuperClass(classType); |
| 74863 | if (!classType) { |
| 74864 | return false; |
| 74865 | } |
| 74866 | var superProperty = getPropertyOfType(classType, prop.escapedName); |
| 74867 | if (superProperty && superProperty.valueDeclaration) { |
| 74868 | return true; |
| 74869 | } |
| 74870 | } |
| 74871 | } |
| 74872 | function getSuperClass(classType) { |
| 74873 | var x = getBaseTypes(classType); |
| 74874 | if (x.length === 0) { |
no test coverage detected
searching dependent graphs…