TypeScript/tests/baselines/reference/thisTypeInInterfaces.types
Anders Hejlsberg abd2a8526d Adding tests
2015-09-26 12:58:53 -07:00

80 lines
1 KiB
Plaintext

=== tests/cases/conformance/types/thisType/thisTypeInInterfaces.ts ===
interface I1 {
>I1 : I1
x: this;
>x : this
f(x: this): this;
>f : (x: this) => this
>x : this
}
interface I2 {
>I2 : I2
(x: this): this;
>x : this
new (x: this): this;
>x : this
[x: string]: this;
>x : string
}
interface Foo<T> {
>Foo : Foo<T>
>T : T
x: T;
>x : T
>T : T
y: this;
>y : this
}
interface I3 {
>I3 : I3
a: this[];
>a : this[]
b: [this, this];
>b : [this, this]
c: this | Date;
>c : this | Date
>Date : Date
d: this & Date;
>d : this & Date
>Date : Date
e: (((this)));
>e : this
f: (x: this) => this;
>f : (x: this) => this
>x : this
g: new (x: this) => this;
>g : new (x: this) => this
>x : this
h: Foo<this>;
>h : Foo<this>
>Foo : Foo<T>
i: Foo<this | (() => this)>;
>i : Foo<this | (() => this)>
>Foo : Foo<T>
j: (x: any) => x is this;
>j : (x: any) => x is this
>x : any
>x : any
}