From d8d5ead83b3e9eb00931ed51c5f2f70a062469f4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 15 Oct 2019 14:06:47 -0700 Subject: [PATCH] Restore 'type' and 'namespace' to All completion filter (#34491) Vote in the comments below if you think I should restore other keywords! Remember to like and subscribe! --- src/harness/fourslash.ts | 4 ++++ src/services/completions.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index b6a1cf72f3..f884711ae3 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -4894,12 +4894,14 @@ namespace FourSlashInterface { "declare", "keyof", "module", + "namespace", "never", "readonly", "number", "object", "string", "symbol", + "type", "unique", "unknown", "bigint", @@ -5091,12 +5093,14 @@ namespace FourSlashInterface { "declare", "keyof", "module", + "namespace", "never", "readonly", "number", "object", "string", "symbol", + "type", "unique", "unknown", "bigint", diff --git a/src/services/completions.ts b/src/services/completions.ts index 1c3288a328..5aa003fd59 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -2406,6 +2406,8 @@ namespace ts.Completions { return isFunctionLikeBodyKeyword(kind) || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.ModuleKeyword + || kind === SyntaxKind.TypeKeyword + || kind === SyntaxKind.NamespaceKeyword || isTypeKeyword(kind) && kind !== SyntaxKind.UndefinedKeyword; case KeywordCompletionFilters.FunctionLikeBodyKeywords: return isFunctionLikeBodyKeyword(kind);