forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick PR microsoft#46737 into release-4.5
Component commits: 74cd7a5 fix extra newline 8df5bef Merge branch 'main' into gabritto/issue46609 67d631c fix test
- Loading branch information
1 parent
2857273
commit 196180a
Showing
13 changed files
with
103 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @Filename: a.ts | ||
// @newline: LF | ||
// Case: formatting: semicolons | ||
////interface Base { | ||
//// a: string; | ||
//// b(a: string): void; | ||
//// c(a: string): string; | ||
//// c(a: number): number; | ||
////} | ||
////class Sub implements Base { | ||
//// /*a*/ | ||
////} | ||
|
||
|
||
verify.completions({ | ||
marker: "a", | ||
isNewIdentifierLocation: true, | ||
preferences: { | ||
includeCompletionsWithInsertText: true, | ||
includeCompletionsWithSnippetText: false, | ||
includeCompletionsWithClassMemberSnippets: true, | ||
}, | ||
includes: [ | ||
{ | ||
name: "a", | ||
sortText: completion.SortText.LocationPriority, | ||
replacementSpan: { | ||
fileName: "", | ||
pos: 0, | ||
end: 0, | ||
}, | ||
insertText: "a: string;", | ||
}, | ||
{ | ||
name: "b", | ||
sortText: completion.SortText.LocationPriority, | ||
replacementSpan: { | ||
fileName: "", | ||
pos: 0, | ||
end: 0, | ||
}, | ||
insertText: | ||
`b(a: string): void { | ||
}`, | ||
}, | ||
{ | ||
name: "c", | ||
sortText: completion.SortText.LocationPriority, | ||
replacementSpan: { | ||
fileName: "", | ||
pos: 0, | ||
end: 0, | ||
}, | ||
insertText: | ||
`c(a: string): string; | ||
c(a: number): number; | ||
c(a: any): string | number { | ||
}`, | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,7 @@ verify.completions({ | |
pos: 0, | ||
end: 0, | ||
}, | ||
insertText: | ||
"boo(): string;\n", | ||
insertText: "boo(): string;", | ||
} | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters