mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Only show first overload in a series of consecutive overload signatures for navigateTo
This commit is contained in:
30
tests/cases/fourslash/navigationItemsOverloads1.ts
Normal file
30
tests/cases/fourslash/navigationItemsOverloads1.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function overload(a: string): boolean;
|
||||
////function overload(b: boolean): boolean;
|
||||
////function overload(b: number): boolean;
|
||||
////function overload(f: typeof overload): boolean;
|
||||
////function overload(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
////
|
||||
////interface I {
|
||||
//// interfaceMethodSignature(a: string): boolean;
|
||||
//// interfaceMethodSignature(b: boolean): boolean;
|
||||
//// interfaceMethodSignature(b: number): boolean;
|
||||
//// interfaceMethodSignature(f: I): boolean;
|
||||
////}
|
||||
////
|
||||
////class C {
|
||||
//// methodOverload(a: string): boolean;
|
||||
//// methodOverload(b: boolean): boolean;
|
||||
//// methodOverload(b: number): boolean;
|
||||
//// methodOverload(f: I): boolean;
|
||||
//// methodOverload(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw C;
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(1, "overload", "exact");
|
||||
verify.navigationItemsListCount(1, "interfaceMethodSignature", "exact");
|
||||
verify.navigationItemsListCount(1, "methodOverload", "exact");
|
||||
12
tests/cases/fourslash/navigationItemsOverloads2.ts
Normal file
12
tests/cases/fourslash/navigationItemsOverloads2.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////interface I {
|
||||
//// interfaceMethodSignature(a: string): boolean;
|
||||
//// interfaceMethodSignature(b: number): boolean;
|
||||
//// interfaceMethodSignature(f: I): boolean;
|
||||
////}
|
||||
////interface I {
|
||||
//// interfaceMethodSignature(b: boolean): boolean;
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(2, "interfaceMethodSignature", "exact");
|
||||
29
tests/cases/fourslash/navigationItemsOverloadsBroken.ts
Normal file
29
tests/cases/fourslash/navigationItemsOverloadsBroken.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function overload1(a: string): boolean;
|
||||
////function overload1(b: boolean): boolean;
|
||||
////function overload1(b: number): boolean;
|
||||
////
|
||||
////var heyImNotInterruptingAnythingAmI = '?';
|
||||
////
|
||||
////function overload1(f: typeof overload): boolean;
|
||||
////function overload1(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
|
||||
////function overload2(a: string): boolean;
|
||||
////function overload2(b: boolean): boolean;
|
||||
////function overload2(b: number): boolean;
|
||||
////
|
||||
////function iJustRuinEverything(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
////
|
||||
////function overload2(f: typeof overload): boolean;
|
||||
////function overload2(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(1, "overload1", "exact");
|
||||
verify.navigationItemsListCount(2, "overload2", "exact");
|
||||
verify.navigationItemsListCount(3, "overload", "prefix");
|
||||
Reference in New Issue
Block a user