File: infinitelyExpandingOverloads.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (32 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download | duplicates (6)
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
tests/cases/compiler/infinitelyExpandingOverloads.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.


==== tests/cases/compiler/infinitelyExpandingOverloads.ts (1 errors) ====
    interface KnockoutSubscription2<T> {
        target: KnockoutObservableBase2<T>;
    }
    interface KnockoutObservableBase2<T> {
        subscribe(callback: (newValue: T) => void, target?: any, topic?: string): KnockoutSubscription2<T>;
    }
    interface ValidationPlacement2<TValue> {
        initialize(validatable: Validatable2<TValue>): void;
    }
    interface Validatable2<TValue> {
        validators: KnockoutObservableBase2<Validator2<TValue>>;
    }
    class Validator2<TValue> {
        private _subscription: KnockoutSubscription2<TValue>;
    }
    class ViewModel<TValue> {
        public validationPlacements: Array<ValidationPlacement2<TValue>> = new Array<ValidationPlacement2<TValue>>();
    }
    class Widget<TValue> {
        constructor(viewModelType: new () => ViewModel<TValue>); // Shouldnt error on this overload
        constructor(viewModelType: new () => ViewModel<TValue>) {
        }
        public get options(): ViewModel<TValue> {
                   ~~~~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            return null;
        }
    }