If I import Ractive like so:
/// <reference path="lib/ractive.d.ts" />
import Ractive = require("lib/ractive");
I get an error in the require(..) line:
File 'path/to/lib/ractive.d.ts' is not an external module.
There are no errors
However if I replace this block:
// used for require()
declare module "ractive" {
export = Ractive;
}
declare var Ractive: Ractive.Static;
with:
// used for require()
declare var Ractive: Ractive.Static;
export = Ractive;
then it works just fine.
I'm not creating a pull request as I'm not entirely sure if this is the right fix but it seems some changes need to be made to make it work as an external module (or I'm using it the wrong way).
If I import Ractive like so:
I get an error in the require(..) line:
File 'path/to/lib/ractive.d.ts' is not an external module.There are no errors
However if I replace this block:
with:
then it works just fine.
I'm not creating a pull request as I'm not entirely sure if this is the right fix but it seems some changes need to be made to make it work as an external module (or I'm using it the wrong way).