From 8b264238482ab47840efd456aa9ae19c2eaf0636 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Thu, 30 Apr 2015 14:35:48 -0700 Subject: [PATCH] Fix for Completion interferes with typeing a "type alias". #2882 + test case --- src/services/services.ts | 3 +++ tests/cases/fourslash/completionListAtInvalidLocations.ts | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/services.ts b/src/services/services.ts index 7c93e62677f..c42fcf79947 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3138,6 +3138,9 @@ module ts { (previousToken.parent && previousToken.parent.parent && previousToken.parent.parent.kind === SyntaxKind.ArrayBindingPattern); // var [ ...z| + case SyntaxKind.TypeKeyword: // type htm| + return true; + case SyntaxKind.PublicKeyword: case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: diff --git a/tests/cases/fourslash/completionListAtInvalidLocations.ts b/tests/cases/fourslash/completionListAtInvalidLocations.ts index 96368280371..6e4b4056a7d 100644 --- a/tests/cases/fourslash/completionListAtInvalidLocations.ts +++ b/tests/cases/fourslash/completionListAtInvalidLocations.ts @@ -18,7 +18,8 @@ /////* /*inComment5*/ ////var v11 = ''; //// // /*inComment6*/ -//// +////var v12 = ''; +////type htm/*inTypeAlias*/ /// ////// /*inComment7*/ ////foo;