-
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.
Overloads shouldn't gain @deprecated tags of other overloads in quick…
… info (#50904) * Add test case to check for the propogation of @Deprecation tag to multiple overloads * Implement filter to only include @deprecated tag in first signature after JSDoc comment
- Loading branch information
1 parent
e14a229
commit 503604c
Showing
2 changed files
with
28 additions
and
1 deletion.
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
26 changes: 26 additions & 0 deletions
26
tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload06.ts
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,26 @@ | ||
/// <reference path="fourslash.ts" /> | ||
// @target: esnext | ||
|
||
// @Filename: /a.ts | ||
/////** | ||
//// * A function that gets the length of an array. | ||
//// * @param testParam | ||
//// * @deprecated Use the new method instead. | ||
//// */ | ||
////export function getArrayLength(arr: string[]): number; | ||
////export function getArrayLength(arr: boolean[]): number; | ||
|
||
// @Filename: /b.ts | ||
////import { getArrayLength } from "/a"; | ||
/////*1*/getArrayLength(["hello"]); | ||
/////*2*/getArrayLength([true]); | ||
/////*3*/getArrayLength(["hello"]); | ||
|
||
|
||
goTo.file("/b.ts"); | ||
goTo.marker("1") | ||
verify.quickInfoIs("(alias) getArrayLength(arr: string[]): number (+1 overload)\nimport getArrayLength", "A function that gets the length of an array.", [{name: "param", text: "testParam"}, {name: "deprecated", text: "Use the new method instead."}]) | ||
goTo.marker("2") | ||
verify.quickInfoIs("(alias) getArrayLength(arr: boolean[]): number (+1 overload)\nimport getArrayLength", "A function that gets the length of an array.", [{name: "param", text: "testParam"}]) | ||
goTo.marker("3") | ||
verify.quickInfoIs("(alias) getArrayLength(arr: string[]): number (+1 overload)\nimport getArrayLength", "A function that gets the length of an array.", [{name: "param", text: "testParam"}, {name: "deprecated", text: "Use the new method instead."}]) |