Skip to content

Commit d2fab65

Browse files
Added test.
1 parent a8dc7af commit d2fab65

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6441,6 +6441,7 @@ namespace ts {
64416441
readonly disableSuggestions?: boolean;
64426442
readonly quotePreference?: "auto" | "double" | "single";
64436443
readonly includeCompletionsForModuleExports?: boolean;
6444+
readonly includeAutomaticOptionalChainCompletions?: boolean;
64446445
readonly includeCompletionsWithInsertText?: boolean;
64456446
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
64466447
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/// <reference path="fourslash.ts" />
2+
// @strict: true
3+
4+
//// interface User {
5+
//// address?: {
6+
//// city: string;
7+
//// "postal code": string;
8+
//// }
9+
//// };
10+
//// declare const user: User;
11+
//// user.address[|./**/|]
12+
13+
verify.completions({
14+
marker: "",
15+
exact: [],
16+
preferences: {
17+
includeInsertTextCompletions: true,
18+
includeAutomaticOptionalChainCompletions: false
19+
},
20+
});

tests/cases/fourslash/fourslash.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ declare namespace FourSlashInterface {
583583
readonly quotePreference?: "double" | "single";
584584
readonly includeCompletionsForModuleExports?: boolean;
585585
readonly includeInsertTextCompletions?: boolean;
586+
readonly includeAutomaticOptionalChainCompletions?: boolean;
586587
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
587588
readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
588589
}

0 commit comments

Comments
 (0)