@@ -1370,7 +1370,7 @@ namespace ts {
13701370 const missingMembers = getMissingInterfaceMembers ( < InterfaceDeclaration > type . symbol . declarations [ 0 ] , existingMembers , checker ) ;
13711371
13721372 for ( const member of missingMembers ) {
1373- if ( member . kind === SyntaxKind . PropertySignature ) {
1373+ if ( member . kind === SyntaxKind . PropertySignature || member . kind === SyntaxKind . PropertyDeclaration ) {
13741374 const interfaceProperty = < PropertySignature > member ;
13751375 if ( trackingAddedMembers . indexOf ( interfaceProperty . name . getText ( ) ) === - 1 ) {
13761376 let propertyText = "" ;
@@ -1405,25 +1405,24 @@ namespace ts {
14051405 * Gets members in an interface and all its base types.
14061406 */
14071407 function getInterfaceMembers ( declaration : InterfaceDeclaration , checker : TypeChecker ) : TypeElement [ ] {
1408+ let result : TypeElement [ ] = declaration . members
1409+ ? declaration . members . filter ( member => ! ( getModifierFlags ( member ) & ModifierFlags . Private ) )
1410+ : [ ] ;
14081411 const clauses = getInterfaceBaseTypeNodes ( declaration ) ;
1409- let result : TypeElement [ ] = [ ] ;
1410- for ( let i = 0 ; clauses && i < clauses . length ; i ++ ) {
1411- const type = checker . getTypeAtLocation ( clauses [ i ] ) ;
1412- if ( type && type . symbol && type . symbol . declarations ) {
1413- result = result . concat ( getInterfaceMembers ( < InterfaceDeclaration > type . symbol . declarations [ 0 ] , checker ) ) ;
1412+ if ( clauses ) {
1413+ for ( const clause of clauses ) {
1414+ const type = checker . getTypeAtLocation ( clause ) ;
1415+ if ( type && type . symbol && type . symbol . declarations ) {
1416+ result = result . concat ( getInterfaceMembers ( < InterfaceDeclaration > type . symbol . declarations [ 0 ] , checker ) ) ;
1417+ }
14141418 }
14151419 }
14161420
1417- if ( declaration . members ) {
1418- result = result . concat ( declaration . members ) ;
1419- }
1420-
14211421 return result ;
14221422 }
14231423
14241424 function getMissingInterfaceMembers ( declaration : InterfaceDeclaration , existingMembers : string [ ] , checker : TypeChecker ) : TypeElement [ ] {
14251425 const interfaceMembers = getInterfaceMembers ( declaration , checker ) ;
1426-
14271426 return ts . filter ( interfaceMembers , member => ! member . name || existingMembers . indexOf ( member . name . getText ( ) ) === - 1 ) ;
14281427
14291428 }
0 commit comments