From f2a7367e9b63a2155d45708ac5b54161f8579926 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 17 Mar 2015 07:50:15 -0700 Subject: [PATCH] Added index signature case. --- .../completionListInUnclosedIndexSignature01.ts | 11 +++++++++++ .../completionListInUnclosedIndexSignature02.ts | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/cases/fourslash/completionListInUnclosedIndexSignature01.ts create mode 100644 tests/cases/fourslash/completionListInUnclosedIndexSignature02.ts diff --git a/tests/cases/fourslash/completionListInUnclosedIndexSignature01.ts b/tests/cases/fourslash/completionListInUnclosedIndexSignature01.ts new file mode 100644 index 00000000000..fd2e5664f04 --- /dev/null +++ b/tests/cases/fourslash/completionListInUnclosedIndexSignature01.ts @@ -0,0 +1,11 @@ +/// + + +////class C { +//// [foo: string]: typeof /*1*/ +////} + + +goTo.marker("1"); +verify.completionListContains("foo"); +verify.completionListContains("C"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInUnclosedIndexSignature02.ts b/tests/cases/fourslash/completionListInUnclosedIndexSignature02.ts new file mode 100644 index 00000000000..318730e41a6 --- /dev/null +++ b/tests/cases/fourslash/completionListInUnclosedIndexSignature02.ts @@ -0,0 +1,13 @@ +/// + + +////class C { +//// [foo: /*1*/ +////} + +goTo.marker("1"); +verify.completionListContains("C"); +verify.completionListContains("foo"); // ideally this shouldn't show up for a type +edit.insert("typeof "); +verify.completionListContains("C"); +verify.completionListContains("foo"); \ No newline at end of file