2015-06-03 00:22:52 +02:00
|
|
|
// @declaration: true
|
2015-06-02 01:26:41 +02:00
|
|
|
|
2015-06-03 00:22:52 +02:00
|
|
|
// @Filename: file1.ts
|
2015-06-02 01:26:41 +02:00
|
|
|
|
2015-06-03 00:22:52 +02:00
|
|
|
declare class C1 { }
|
2015-06-02 01:26:41 +02:00
|
|
|
|
2015-06-03 00:22:52 +02:00
|
|
|
interface C1 { }
|
2015-06-02 01:26:41 +02:00
|
|
|
|
2015-06-03 00:22:52 +02:00
|
|
|
interface C2 { }
|
2015-06-02 01:26:41 +02:00
|
|
|
|
2015-06-03 00:22:52 +02:00
|
|
|
declare class C2 { }
|
|
|
|
|
|
|
|
class C3 { } // error -- cannot merge non-ambient class and interface
|
|
|
|
|
|
|
|
interface C3 { } // error -- cannot merge non-ambient class and interface
|
|
|
|
|
|
|
|
interface C4 { } // error -- cannot merge non-ambient class and interface
|
|
|
|
|
|
|
|
class C4 { } // error -- cannot merge non-ambient class and interface
|
|
|
|
|
|
|
|
interface C5 {
|
|
|
|
x1: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare class C5 {
|
|
|
|
x2: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface C5 {
|
|
|
|
x3: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface C5 {
|
|
|
|
x4: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
// checks if properties actually were merged
|
|
|
|
var c5 : C5;
|
|
|
|
c5.x1;
|
|
|
|
c5.x2;
|
|
|
|
c5.x3;
|
|
|
|
c5.x4;
|
|
|
|
|
|
|
|
// @Filename: file2.ts
|
|
|
|
|
|
|
|
declare class C6 { }
|
|
|
|
|
|
|
|
interface C7 { }
|
|
|
|
|
|
|
|
// @Filename: file3.ts
|
|
|
|
|
|
|
|
interface C6 { }
|
|
|
|
|
|
|
|
declare class C7 { }
|