5

Here's code.

filename is common.ts

module common{

        export function commonInit(){

            return true;
        }
}

when i build eclipse Ant, it becomes

"Error TS2384: Overload signatures must all be ambient or non-ambient.".

Can anybody explain how to solve that error.

arcs
  • 51
  • 1
  • 8
  • What else are you referencing that may contain a module named `common`... and what module flag are you using to compile? – Fenton Mar 14 '16 at 08:26

1 Answers1

0

You should try this:

declare module Common{

        function commonInit(){

            return true;
        }
}
export var common:Common;

You cannot export inside a module.

Michael Desigaud
  • 2,115
  • 1
  • 15
  • 15