TypeScript/tests/baselines/reference/constructorOverloads4.errors.txt
2014-10-01 11:27:20 -07:00

30 lines
1.4 KiB
Plaintext

tests/cases/compiler/constructorOverloads4.ts(2,18): error TS2300: Duplicate identifier 'Function'.
tests/cases/compiler/constructorOverloads4.ts(5,21): error TS2300: Duplicate identifier 'Function'.
tests/cases/compiler/constructorOverloads4.ts(6,21): error TS2300: Duplicate identifier 'Function'.
tests/cases/compiler/constructorOverloads4.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'?
==== tests/cases/compiler/constructorOverloads4.ts (5 errors) ====
declare module M {
export class Function {
~~~~~~~~
!!! error TS2300: Duplicate identifier 'Function'.
constructor(...args: string[]);
}
export function Function(...args: any[]): any;
~~~~~~~~
!!! error TS2300: Duplicate identifier 'Function'.
export function Function(...args: string[]): Function;
~~~~~~~~
!!! error TS2300: Duplicate identifier 'Function'.
}
(new M.Function("return 5"))();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
M.Function("yo");
~~~~~~~~~~~~~~~~
!!! error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'?