38 lines
617 B
Plaintext
38 lines
617 B
Plaintext
|
=== tests/cases/compiler/objectMembersOnTypes.ts ===
|
||
|
interface I {}
|
||
|
>I : I
|
||
|
|
||
|
class AAA implements I { }
|
||
|
>AAA : AAA
|
||
|
>I : I
|
||
|
|
||
|
var x: number;
|
||
|
>x : number
|
||
|
|
||
|
x.toString();
|
||
|
>x.toString() : string
|
||
|
>x.toString : (radix?: number) => string
|
||
|
>x : number
|
||
|
>toString : (radix?: number) => string
|
||
|
|
||
|
var i: I;
|
||
|
>i : I
|
||
|
>I : I
|
||
|
|
||
|
i.toString(); // used to be an error
|
||
|
>i.toString() : string
|
||
|
>i.toString : () => string
|
||
|
>i : I
|
||
|
>toString : () => string
|
||
|
|
||
|
var c: AAA;
|
||
|
>c : AAA
|
||
|
>AAA : AAA
|
||
|
|
||
|
c.toString(); // used to be an error
|
||
|
>c.toString() : string
|
||
|
>c.toString : () => string
|
||
|
>c : AAA
|
||
|
>toString : () => string
|
||
|
|