diff --git a/src/services/completions.ts b/src/services/completions.ts index dc01ea8ede4b9..c29b2cccbf96d 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -5757,6 +5757,7 @@ function tryGetTypeLiteralNode(node: Node): TypeLiteralNode | undefined { case SyntaxKind.SemicolonToken: case SyntaxKind.CommaToken: case SyntaxKind.Identifier: + case SyntaxKind.StringKeyword: if (parent.kind === SyntaxKind.PropertySignature && isTypeLiteralNode(parent.parent)) { return parent.parent; } diff --git a/tests/cases/fourslash/completionListInTypeLiteralInTypeParameter8.ts b/tests/cases/fourslash/completionListInTypeLiteralInTypeParameter8.ts index 7220a86251242..df887088d12a4 100644 --- a/tests/cases/fourslash/completionListInTypeLiteralInTypeParameter8.ts +++ b/tests/cases/fourslash/completionListInTypeLiteralInTypeParameter8.ts @@ -17,7 +17,7 @@ ////var foobar: Bar<{ //// two: { //// three: { -//// five: string, +//// five: string //// /*4*/ //// }, //// /*0*/