From 9ff9c41a9a89dfeb8aed789c77aef8f329f5c0c1 Mon Sep 17 00:00:00 2001 From: Tim Suchanek Date: Fri, 18 Oct 2019 17:59:49 +0200 Subject: [PATCH] Add completion test for partial generic object (#34559) --- ...thOptionalPropertiesGenericValidBoolean.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/cases/fourslash/completionsWithOptionalPropertiesGenericValidBoolean.ts diff --git a/tests/cases/fourslash/completionsWithOptionalPropertiesGenericValidBoolean.ts b/tests/cases/fourslash/completionsWithOptionalPropertiesGenericValidBoolean.ts new file mode 100644 index 00000000000..ebba38f0dd3 --- /dev/null +++ b/tests/cases/fourslash/completionsWithOptionalPropertiesGenericValidBoolean.ts @@ -0,0 +1,19 @@ +/// +// @strict: true + +//// interface MyOptions { +//// hello?: boolean; +//// world?: boolean; +//// } +//// declare function bar(options?: Partial): void; +//// bar({ hello: true, /*1*/ }); + +verify.completions({ + marker: '1', + includes: [ + { + sortText: completion.SortText.OptionalMember, + name: 'world' + }, + ] +})