I'm trying to create some definition files for a personal project. (I'm recreating the context here with different class/module names, so the modeling may not make a whole lot of sense).
I have the following interface definition file, that has no dependencies, and compiles fine:
// File: automobile.d.ts
declare module Transport {
interface Automobile {
// ... variables and functions
accelerate(direction:String):Boolean;
}
}
However, in this file, when I try to reference Automobile in this file within the same Transport module, I get a Cannot find name 'Automobile'.
// File: automobile_collection.d.ts
declare module Transport {
interface AutomobileCollection {
size:Number;
getItemAt(index:Number): Automobile;
}
}
I've tried exporting the interface, but that didn't help. Any ideas what I'm doing wrong?
number,string,boolean(lowercase) instead of the interfaces as using the interfaces can lead to problems.