Skip to content

Commit 5477408

Browse files
committed
add new flag to protocol type
1 parent 1ebdf3d commit 5477408

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/server/protocol.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,6 +3406,13 @@ namespace ts.server.protocol {
34063406
* `class A { foo }`.
34073407
*/
34083408
readonly includeCompletionsWithClassMemberSnippets?: boolean;
3409+
/**
3410+
* If enabled, object literal methods will have a method declaration completion entry in addition
3411+
* to the regular completion entry containing just the method name.
3412+
* E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
3413+
* in addition to `const objectLiteral: T = { foo }`.
3414+
*/
3415+
readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
34093416
readonly allowIncompleteCompletions?: boolean;
34103417
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
34113418
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9629,6 +9629,13 @@ declare namespace ts.server.protocol {
96299629
* `class A { foo }`.
96309630
*/
96319631
readonly includeCompletionsWithClassMemberSnippets?: boolean;
9632+
/**
9633+
* If enabled, object literal methods will have a method declaration completion entry in addition
9634+
* to the regular completion entry containing just the method name.
9635+
* E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
9636+
* in addition to `const objectLiteral: T = { foo }`.
9637+
*/
9638+
readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
96329639
readonly allowIncompleteCompletions?: boolean;
96339640
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
96349641
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */

0 commit comments

Comments
 (0)