I have a file module.d.ts with declaration
declare module "ArrayItem" {import out = require("models/ArrayItem"); export = out;}
Now I have a file Array.ts and the first line is
/// <reference path="../module.d.ts" />
import array = require("ArrayItem").
But this is not working. I got script error.
If I use,
/// <reference path="../module.d.ts" />
import array = require("models/ArrayItem")
Then I did not get any error.
What is the issue in module loading here?
If I have a module.d.ts, then the arrayitem module should be loaded from require("arrayitem").
Correct? Or should I always the correct path for ArrayItem?
I am confused here. Can someone throw help here?