TypeScript/tests/baselines/reference/typesWithPublicConstructor.errors.txt
2014-09-12 13:35:07 -07:00

25 lines
No EOL
967 B
Text

tests/cases/conformance/types/members/typesWithPublicConstructor.ts(8,5): error TS2323: Type 'Function' is not assignable to type '() => void'.
tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): error TS2346: Supplied parameters do not match any signature of call target.
==== tests/cases/conformance/types/members/typesWithPublicConstructor.ts (2 errors) ====
// public is allowed on a constructor but is not meaningful
class C {
public constructor() { }
}
var c = new C();
var r: () => void = c.constructor;
~
!!! error TS2323: Type 'Function' is not assignable to type '() => void'.
class C2 {
public constructor(x: number);
public constructor(x: any) { }
}
var c2 = new C2();
~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
var r2: (x: number) => void = c2.constructor;