38 lines
712 B
Text
38 lines
712 B
Text
=== tests/cases/compiler/f1.ts ===
|
|
|
|
export class A {};
|
|
>A : A
|
|
|
|
=== tests/cases/compiler/f2.ts ===
|
|
|
|
// change the shape of Array<T>
|
|
import {A} from "./f1";
|
|
>A : typeof A
|
|
|
|
declare global {
|
|
>global : any
|
|
|
|
interface Array<T> {
|
|
>Array : T[]
|
|
>T : T
|
|
|
|
getCountAsString(): string;
|
|
>getCountAsString : () => string
|
|
}
|
|
}
|
|
|
|
let x = [1];
|
|
>x : number[]
|
|
>[1] : number[]
|
|
>1 : number
|
|
|
|
let y = x.getCountAsString().toLowerCase();
|
|
>y : string
|
|
>x.getCountAsString().toLowerCase() : string
|
|
>x.getCountAsString().toLowerCase : () => string
|
|
>x.getCountAsString() : string
|
|
>x.getCountAsString : () => string
|
|
>x : number[]
|
|
>getCountAsString : () => string
|
|
>toLowerCase : () => string
|
|
|