2014-12-17 04:11:07 +01:00
|
|
|
tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1184: An implementation cannot be declared in ambient contexts.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/constructorOverloads6.ts (1 errors) ====
|
|
|
|
declare class FooBase {
|
|
|
|
constructor(s: string);
|
|
|
|
constructor(n: number);
|
|
|
|
constructor(x: any) {
|
|
|
|
~
|
2014-12-17 04:11:07 +01:00
|
|
|
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
bar1():void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare class Foo extends FooBase {
|
|
|
|
constructor(s: string);
|
|
|
|
constructor(n: number);
|
|
|
|
constructor(x: any, y?:any);
|
|
|
|
|
|
|
|
bar1():void;
|
|
|
|
}
|
|
|
|
|
|
|
|
var f1 = new Foo("hey");
|
|
|
|
var f2 = new Foo(0);
|
|
|
|
var f3 = new Foo(f1);
|
|
|
|
var f4 = new Foo([f1,f2,f3]);
|
|
|
|
|
|
|
|
f1.bar1();
|
|
|
|
|