diff --git a/src/services/completions.ts b/src/services/completions.ts
index 56833298a64..45317be065e 100644
--- a/src/services/completions.ts
+++ b/src/services/completions.ts
@@ -895,6 +895,7 @@ namespace ts.Completions {
node = (parent as QualifiedName).left;
break;
case SyntaxKind.ImportType:
+ case SyntaxKind.MetaProperty:
node = parent;
break;
default:
@@ -1061,6 +1062,12 @@ namespace ts.Completions {
}
}
+ if (isMetaProperty(node) && (node.keywordToken === SyntaxKind.NewKeyword || node.keywordToken === SyntaxKind.ImportKeyword)) {
+ const completion = (node.keywordToken === SyntaxKind.NewKeyword) ? "target" : "meta";
+ symbols.push(typeChecker.createSymbol(SymbolFlags.Property, escapeLeadingUnderscores(completion)));
+ return;
+ }
+
if (!isTypeLocation) {
addTypeProperties(typeChecker.getTypeAtLocation(node)!);
}
diff --git a/tests/cases/fourslash/completionImportMeta.ts b/tests/cases/fourslash/completionImportMeta.ts
new file mode 100644
index 00000000000..cac84c2c82f
--- /dev/null
+++ b/tests/cases/fourslash/completionImportMeta.ts
@@ -0,0 +1,6 @@
+///
+
+////import./**/
+
+goTo.marker("");
+verify.completionListContains("meta");
\ No newline at end of file
diff --git a/tests/cases/fourslash/completionsNewTarget.ts b/tests/cases/fourslash/completionsNewTarget.ts
new file mode 100644
index 00000000000..3f8a4d689cc
--- /dev/null
+++ b/tests/cases/fourslash/completionsNewTarget.ts
@@ -0,0 +1,10 @@
+///
+
+////class C {
+//// constructor() {
+//// if (C === new./**/)
+//// }
+////}
+
+goTo.marker("");
+verify.completionListContains("target");
\ No newline at end of file