@@ -1576,7 +1576,7 @@ module ts {
1576
1576
1577
1577
var isValid = isIdentifierStart ( displayName . charCodeAt ( 0 ) , target ) ;
1578
1578
for ( var i = 1 , n = displayName . length ; isValid && i < n ; i ++ ) {
1579
- isValid = isValid && isIdentifierPart ( displayName . charCodeAt ( i ) , target ) ;
1579
+ isValid = isIdentifierPart ( displayName . charCodeAt ( i ) , target ) ;
1580
1580
}
1581
1581
1582
1582
if ( isValid ) {
@@ -1742,9 +1742,9 @@ module ts {
1742
1742
return ( SyntaxKind . FirstPunctuation <= kind && kind <= SyntaxKind . LastPunctuation ) ;
1743
1743
}
1744
1744
1745
- function isVisibleWithinDeclaration ( symbol : Symbol , containingClass : Declaration ) : boolean {
1745
+ function isVisibleWithinClassDeclaration ( symbol : Symbol , containingClass : Declaration ) : boolean {
1746
1746
var declaration = symbol . declarations && symbol . declarations [ 0 ] ;
1747
- return ! ( declaration && declaration . flags & NodeFlags . Private && containingClass !== declaration . parent ) ;
1747
+ return ! ( declaration && ( declaration . flags & NodeFlags . Private ) && containingClass !== declaration . parent ) ;
1748
1748
}
1749
1749
1750
1750
function filterContextualMembersList ( contextualMemberSymbols : Symbol [ ] , existingMembers : Declaration [ ] ) : Symbol [ ] {
@@ -1755,11 +1755,11 @@ module ts {
1755
1755
var existingMemberNames : Map < boolean > = { } ;
1756
1756
forEach ( existingMembers , m => {
1757
1757
if ( m . kind !== SyntaxKind . PropertyAssignment ) {
1758
- // Ignore ommited expressions for missing members in the object literal
1758
+ // Ignore omitted expressions for missing members in the object literal
1759
1759
return ;
1760
1760
}
1761
1761
1762
- if ( position <= m . getEnd ( ) && position > = m . getStart ( ) ) {
1762
+ if ( m . getStart ( ) <= position && position < = m . getEnd ( ) ) {
1763
1763
// If this is the current item we are editing right now, do not filter it out
1764
1764
return ;
1765
1765
}
@@ -1768,7 +1768,7 @@ module ts {
1768
1768
} ) ;
1769
1769
1770
1770
var filteredMembers : Symbol [ ] = [ ] ;
1771
- forEach ( contextualMemberSymbols , s => {
1771
+ forEach ( contextualMemberSymbols , s => {
1772
1772
if ( ! existingMemberNames [ s . name ] ) {
1773
1773
filteredMembers . push ( s ) ;
1774
1774
}
@@ -1859,7 +1859,7 @@ module ts {
1859
1859
if ( symbol && symbol . flags & SymbolFlags . HasExports ) {
1860
1860
// Extract module or enum members
1861
1861
forEachValue ( symbol . exports , symbol => {
1862
- if ( isVisibleWithinDeclaration ( symbol , containingClass ) ) {
1862
+ if ( isVisibleWithinClassDeclaration ( symbol , containingClass ) ) {
1863
1863
symbols . push ( symbol ) ;
1864
1864
}
1865
1865
} ) ;
@@ -1871,7 +1871,7 @@ module ts {
1871
1871
if ( apparentType ) {
1872
1872
// Filter private properties
1873
1873
forEach ( apparentType . getApparentProperties ( ) , symbol => {
1874
- if ( isVisibleWithinDeclaration ( symbol , containingClass ) ) {
1874
+ if ( isVisibleWithinClassDeclaration ( symbol , containingClass ) ) {
1875
1875
symbols . push ( symbol ) ;
1876
1876
}
1877
1877
} ) ;
@@ -1884,7 +1884,7 @@ module ts {
1884
1884
1885
1885
// Object literal expression, look up possible property names from contextual type
1886
1886
if ( containingObjectLiteral ) {
1887
- var objectLiteral = mappedNode . kind === SyntaxKind . ObjectLiteral ? < ObjectLiteral > mappedNode : < ObjectLiteral > getAncestor ( mappedNode , SyntaxKind . ObjectLiteral ) ;
1887
+ var objectLiteral = < ObjectLiteral > ( mappedNode . kind === SyntaxKind . ObjectLiteral ? mappedNode : getAncestor ( mappedNode , SyntaxKind . ObjectLiteral ) ) ;
1888
1888
1889
1889
Debug . assert ( objectLiteral ) ;
1890
1890
@@ -1897,7 +1897,7 @@ module ts {
1897
1897
1898
1898
var contextualTypeMembers = typeInfoResolver . getPropertiesOfType ( contextualType ) ;
1899
1899
if ( contextualTypeMembers && contextualTypeMembers . length > 0 ) {
1900
- // Add filtterd items to the completion list
1900
+ // Add filtered items to the completion list
1901
1901
var filteredMembers = filterContextualMembersList ( contextualTypeMembers , objectLiteral . properties ) ;
1902
1902
getCompletionEntriesFromSymbols ( filteredMembers , activeCompletionSession ) ;
1903
1903
}
0 commit comments