@@ -1645,7 +1645,7 @@ namespace ts.Completions {
16451645 function isConstructorParameterCompletion ( node : Node ) {
16461646 return node . parent &&
16471647 isParameterOfConstructorDeclaration ( node . parent ) &&
1648- ( isConstructorParameterCompletionKeyword ( node . kind ) || isDeclarationName ( node ) ) ;
1648+ ( isParameterPropertyModifier ( node . kind ) || isDeclarationName ( node ) ) ;
16491649 }
16501650
16511651 /**
@@ -1840,7 +1840,7 @@ namespace ts.Completions {
18401840 // - its name of the parameter and not being edited
18411841 // eg. constructor(a |<- this shouldnt show completion
18421842 if ( ! isIdentifier ( contextToken ) ||
1843- isConstructorParameterCompletionKeyword ( keywordForNode ( contextToken ) ) ||
1843+ isParameterPropertyModifier ( keywordForNode ( contextToken ) ) ||
18441844 isCurrentlyEditingNode ( contextToken ) ) {
18451845 return false ;
18461846 }
@@ -2118,9 +2118,9 @@ namespace ts.Completions {
21182118 case KeywordCompletionFilters . InterfaceElementKeywords :
21192119 return isInterfaceOrTypeLiteralCompletionKeyword ( kind ) ;
21202120 case KeywordCompletionFilters . ConstructorParameterKeywords :
2121- return isConstructorParameterCompletionKeyword ( kind ) ;
2121+ return isParameterPropertyModifier ( kind ) ;
21222122 case KeywordCompletionFilters . FunctionLikeBodyKeywords :
2123- return isFunctionLikeBodyCompletionKeyword ( kind ) ;
2123+ return ! isClassMemberCompletionKeyword ( kind ) ;
21242124 case KeywordCompletionFilters . TypeKeywords :
21252125 return isTypeKeyword ( kind ) ;
21262126 default :
@@ -2135,51 +2135,21 @@ namespace ts.Completions {
21352135
21362136 function isClassMemberCompletionKeyword ( kind : SyntaxKind ) {
21372137 switch ( kind ) {
2138- case SyntaxKind . PublicKeyword :
2139- case SyntaxKind . ProtectedKeyword :
2140- case SyntaxKind . PrivateKeyword :
21412138 case SyntaxKind . AbstractKeyword :
2142- case SyntaxKind . StaticKeyword :
21432139 case SyntaxKind . ConstructorKeyword :
2144- case SyntaxKind . ReadonlyKeyword :
21452140 case SyntaxKind . GetKeyword :
21462141 case SyntaxKind . SetKeyword :
21472142 case SyntaxKind . AsyncKeyword :
21482143 return true ;
2144+ default :
2145+ return isClassMemberModifier ( kind ) ;
21492146 }
21502147 }
21512148
21522149 function keywordForNode ( node : Node ) : SyntaxKind {
21532150 return isIdentifier ( node ) ? node . originalKeywordKind || SyntaxKind . Unknown : node . kind ;
21542151 }
21552152
2156- function isConstructorParameterCompletionKeyword ( kind : SyntaxKind ) {
2157- switch ( kind ) {
2158- case SyntaxKind . PublicKeyword :
2159- case SyntaxKind . PrivateKeyword :
2160- case SyntaxKind . ProtectedKeyword :
2161- case SyntaxKind . ReadonlyKeyword :
2162- return true ;
2163- }
2164- }
2165-
2166- function isFunctionLikeBodyCompletionKeyword ( kind : SyntaxKind ) {
2167- switch ( kind ) {
2168- case SyntaxKind . PublicKeyword :
2169- case SyntaxKind . PrivateKeyword :
2170- case SyntaxKind . ProtectedKeyword :
2171- case SyntaxKind . ReadonlyKeyword :
2172- case SyntaxKind . ConstructorKeyword :
2173- case SyntaxKind . StaticKeyword :
2174- case SyntaxKind . AbstractKeyword :
2175- case SyntaxKind . GetKeyword :
2176- case SyntaxKind . SetKeyword :
2177- case SyntaxKind . UndefinedKeyword :
2178- return false ;
2179- }
2180- return true ;
2181- }
2182-
21832153 function isEqualityOperatorKind ( kind : SyntaxKind ) : kind is EqualityOperator {
21842154 switch ( kind ) {
21852155 case SyntaxKind . EqualsEqualsEqualsToken :
0 commit comments