1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
=== tests/cases/compiler/infinitelyExpandingOverloads.ts ===
interface KnockoutSubscription2<T> {
target: KnockoutObservableBase2<T>;
>target : KnockoutObservableBase2<T>
}
interface KnockoutObservableBase2<T> {
subscribe(callback: (newValue: T) => void, target?: any, topic?: string): KnockoutSubscription2<T>;
>subscribe : (callback: (newValue: T) => void, target?: any, topic?: string) => KnockoutSubscription2<T>
>callback : (newValue: T) => void
>newValue : T
>target : any
>topic : string
}
interface ValidationPlacement2<TValue> {
initialize(validatable: Validatable2<TValue>): void;
>initialize : (validatable: Validatable2<TValue>) => void
>validatable : Validatable2<TValue>
}
interface Validatable2<TValue> {
validators: KnockoutObservableBase2<Validator2<TValue>>;
>validators : KnockoutObservableBase2<Validator2<TValue>>
}
class Validator2<TValue> {
>Validator2 : Validator2<TValue>
private _subscription: KnockoutSubscription2<TValue>;
>_subscription : KnockoutSubscription2<TValue>
}
class ViewModel<TValue> {
>ViewModel : ViewModel<TValue>
public validationPlacements: Array<ValidationPlacement2<TValue>> = new Array<ValidationPlacement2<TValue>>();
>validationPlacements : ValidationPlacement2<TValue>[]
>new Array<ValidationPlacement2<TValue>>() : ValidationPlacement2<TValue>[]
>Array : ArrayConstructor
}
class Widget<TValue> {
>Widget : Widget<TValue>
constructor(viewModelType: new () => ViewModel<TValue>); // Shouldnt error on this overload
>viewModelType : new () => ViewModel<TValue>
constructor(viewModelType: new () => ViewModel<TValue>) {
>viewModelType : new () => ViewModel<TValue>
}
public get options(): ViewModel<TValue> {
>options : ViewModel<TValue>
return null;
>null : null
}
}
|