2015-12-22 22:21:51 +01:00
|
|
|
// @module: commonjs
|
|
|
|
// @declaration: true
|
|
|
|
|
|
|
|
// @filename: f1.ts
|
|
|
|
export class A {x: number;}
|
|
|
|
|
|
|
|
// @filename: f2.ts
|
|
|
|
import {A} from "./f1";
|
|
|
|
|
|
|
|
// change the shape of Array<T>
|
2015-12-28 21:03:54 +01:00
|
|
|
declare global {
|
2015-12-22 22:21:51 +01:00
|
|
|
interface Array<T> {
|
|
|
|
getA(): A;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
let x = [1];
|
|
|
|
let y = x.getA().x;
|