-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(43796): sort deprecated completions lower than others
- Loading branch information
1 parent
5e4fcfb
commit fdec0a5
Showing
15 changed files
with
243 additions
and
38 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
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,24 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @Filename: /foo.ts | ||
/////** @deprecated foo */ | ||
////export const foo = 0; | ||
|
||
// @Filename: /index.ts | ||
/////**/ | ||
|
||
verify.completions({ | ||
marker: "", | ||
includes: [{ | ||
name: "foo", | ||
source: "/foo", | ||
sourceDisplay: "./foo", | ||
hasAction: true, | ||
kind: "const", | ||
kindModifiers: "export,deprecated", | ||
sortText: completion.SortText.DeprecatedAutoImportSuggestions | ||
}], | ||
preferences: { | ||
includeCompletionsForModuleExports: true, | ||
}, | ||
}); |
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,23 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @noLib: true | ||
|
||
////f({ | ||
//// a/**/ | ||
//// xyz: ``, | ||
////}); | ||
////declare function f(options: { | ||
//// /** @deprecated abc */ | ||
//// abc?: number, | ||
//// xyz?: string | ||
////}): void; | ||
|
||
verify.completions({ | ||
marker: "", | ||
exact: [{ | ||
name: "abc", | ||
kind: "property", | ||
kindModifiers: "deprecated,declare,optional", | ||
sortText: completion.SortText.DeprecatedOptionalMember | ||
}], | ||
}); |
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,24 @@ | ||
/// <reference path="fourslash.ts"/> | ||
|
||
////class Foo { | ||
//// /** @deprecated m */ | ||
//// static m() {} | ||
////} | ||
////Foo./**/ | ||
|
||
verify.completions({ | ||
marker: "", | ||
exact: [ | ||
{ | ||
name: "prototype", | ||
sortText: completion.SortText.LocationPriority | ||
}, | ||
{ | ||
name: "m", | ||
kind: "method", | ||
kindModifiers: "static,deprecated", | ||
sortText: completion.SortText.DeprecatedLocalDeclarationPriority | ||
}, | ||
...completion.functionMembers | ||
] | ||
}); |
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,17 @@ | ||
/// <reference path="fourslash.ts"/> | ||
|
||
////module Foo { | ||
//// /** @deprecated foo */ | ||
//// export var foo: number; | ||
////} | ||
////Foo./**/ | ||
|
||
verify.completions({ | ||
marker: "", | ||
exact: [{ | ||
name: "foo", | ||
kind: "var", | ||
kindModifiers: "export,deprecated", | ||
sortText: completion.SortText.DeprecatedLocationPriority | ||
}] | ||
}); |
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,27 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @strict: true | ||
|
||
////interface I { | ||
//// /** @deprecated a */ | ||
//// a: number; | ||
////} | ||
|
||
////const foo = { | ||
//// a: 1 | ||
////} | ||
|
||
////const i: I = { | ||
//// ...foo, | ||
//// /**/ | ||
////} | ||
|
||
verify.completions({ | ||
marker: "", | ||
exact: [{ | ||
name: "a", | ||
sortText: completion.SortText.DeprecatedMemberDeclaredBySpreadAssignment, | ||
kind: 'property', | ||
kindModifiers: "deprecated" | ||
}] | ||
}); |
Oops, something went wrong.