File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1183,7 +1183,7 @@ namespace ts.Completions {
1183
1183
const isTypeOnly = isTypeOnlyCompletion ( ) ;
1184
1184
const allowTypes = isTypeOnly || ! isContextTokenValueLocation ( contextToken ) && isPossiblyTypeArgumentPosition ( contextToken , sourceFile , typeChecker ) ;
1185
1185
if ( isTypeOnly ) {
1186
- keywordFilters = isInsideTypeAssertion ( )
1186
+ keywordFilters = isTypeAssertion ( )
1187
1187
? KeywordCompletionFilters . TypeAssertionKeywords
1188
1188
: KeywordCompletionFilters . TypeKeywords ;
1189
1189
}
@@ -1216,8 +1216,8 @@ namespace ts.Completions {
1216
1216
} ) ;
1217
1217
}
1218
1218
1219
- function isInsideTypeAssertion ( ) : boolean {
1220
- return isAsExpression ( contextToken . parent ) ;
1219
+ function isTypeAssertion ( ) : boolean {
1220
+ return isAssertionExpression ( contextToken . parent ) ;
1221
1221
}
1222
1222
1223
1223
function isTypeOnlyCompletion ( ) : boolean {
@@ -1249,6 +1249,9 @@ namespace ts.Completions {
1249
1249
1250
1250
case SyntaxKind . ExtendsKeyword :
1251
1251
return parentKind === SyntaxKind . TypeParameter ;
1252
+
1253
+ case SyntaxKind . LessThanToken :
1254
+ return parentKind === SyntaxKind . TypeAssertionExpression ;
1252
1255
}
1253
1256
}
1254
1257
return false ;
You can’t perform that action at this time.
0 commit comments