I have an application which I want to convert step by step to TypeScript. Currently we are using browserify to generate a bundle.
When converting to TypeScript I am having some modules which have not yet been converted. In the TypeScript Handbook it says that I can reference external modules, when specifying a type definition file for it.
I have a module A.js which is not yet converted to TypeScript. I have a global type definition file which defines
declare module "A" {
export function foo();
export function bar();
}
I am importing my module like this:
///<reference path="../../typings/NotYetConvertedModules.d.ts" />
import A = require('../someFolder/A');
when compiling this I get
error TS2307: Cannot find external module '../someFolder/A'
When requiring it with require('A') the compilation step works but the module loader cannot find the file, since I am not having a global alias for it.
Is there any way to solve this?