-
Notifications
You must be signed in to change notification settings - Fork 4
Unable to require() #1
Copy link
Copy link
Open
Description
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).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels