|
| 1 | +=== tests/cases/compiler/declFilePrivateMethodOverloads.ts === |
| 2 | + |
| 3 | +interface IContext { |
| 4 | +>IContext : IContext |
| 5 | + |
| 6 | + someMethod(); |
| 7 | +>someMethod : () => any |
| 8 | +} |
| 9 | +class c1 { |
| 10 | +>c1 : c1 |
| 11 | + |
| 12 | + private _forEachBindingContext(bindingContext: IContext, fn: (bindingContext: IContext) => void); |
| 13 | +>_forEachBindingContext : { (bindingContext: IContext, fn: (bindingContext: IContext) => void): any; (bindingContextArray: IContext[], fn: (bindingContext: IContext) => void): any; } |
| 14 | +>bindingContext : IContext |
| 15 | +>IContext : IContext |
| 16 | +>fn : (bindingContext: IContext) => void |
| 17 | +>bindingContext : IContext |
| 18 | +>IContext : IContext |
| 19 | + |
| 20 | + private _forEachBindingContext(bindingContextArray: Array<IContext>, fn: (bindingContext: IContext) => void); |
| 21 | +>_forEachBindingContext : { (bindingContext: IContext, fn: (bindingContext: IContext) => void): any; (bindingContextArray: IContext[], fn: (bindingContext: IContext) => void): any; } |
| 22 | +>bindingContextArray : IContext[] |
| 23 | +>Array : T[] |
| 24 | +>IContext : IContext |
| 25 | +>fn : (bindingContext: IContext) => void |
| 26 | +>bindingContext : IContext |
| 27 | +>IContext : IContext |
| 28 | + |
| 29 | + private _forEachBindingContext(context, fn: (bindingContext: IContext) => void): void { |
| 30 | +>_forEachBindingContext : { (bindingContext: IContext, fn: (bindingContext: IContext) => void): any; (bindingContextArray: IContext[], fn: (bindingContext: IContext) => void): any; } |
| 31 | +>context : any |
| 32 | +>fn : (bindingContext: IContext) => void |
| 33 | +>bindingContext : IContext |
| 34 | +>IContext : IContext |
| 35 | + |
| 36 | + // Function here |
| 37 | + } |
| 38 | + |
| 39 | + private overloadWithArityDifference(bindingContext: IContext); |
| 40 | +>overloadWithArityDifference : { (bindingContext: IContext): any; (bindingContextArray: IContext[], fn: (bindingContext: IContext) => void): any; } |
| 41 | +>bindingContext : IContext |
| 42 | +>IContext : IContext |
| 43 | + |
| 44 | + private overloadWithArityDifference(bindingContextArray: Array<IContext>, fn: (bindingContext: IContext) => void); |
| 45 | +>overloadWithArityDifference : { (bindingContext: IContext): any; (bindingContextArray: IContext[], fn: (bindingContext: IContext) => void): any; } |
| 46 | +>bindingContextArray : IContext[] |
| 47 | +>Array : T[] |
| 48 | +>IContext : IContext |
| 49 | +>fn : (bindingContext: IContext) => void |
| 50 | +>bindingContext : IContext |
| 51 | +>IContext : IContext |
| 52 | + |
| 53 | + private overloadWithArityDifference(context): void { |
| 54 | +>overloadWithArityDifference : { (bindingContext: IContext): any; (bindingContextArray: IContext[], fn: (bindingContext: IContext) => void): any; } |
| 55 | +>context : any |
| 56 | + |
| 57 | + // Function here |
| 58 | + } |
| 59 | +} |
| 60 | +declare class c2 { |
| 61 | +>c2 : c2 |
| 62 | + |
| 63 | + private overload1(context, fn); |
| 64 | +>overload1 : (context: any, fn: any) => any |
| 65 | +>context : any |
| 66 | +>fn : any |
| 67 | + |
| 68 | + private overload2(context); |
| 69 | +>overload2 : { (context: any): any; (context: any, fn: any): any; } |
| 70 | +>context : any |
| 71 | + |
| 72 | + private overload2(context, fn); |
| 73 | +>overload2 : { (context: any): any; (context: any, fn: any): any; } |
| 74 | +>context : any |
| 75 | +>fn : any |
| 76 | +} |
0 commit comments