Reputation: 556
I'm trying to get a very basic hello world working on Typescript & Visual studio 2012. In the test method, I want to declare a parameter of one of the interfaces in module. What am I missing ?
module Demo {
interface Person {
Name: string;
Addresses: Address[];
}
interface Employee extends Person {
Salary: number;
}
interface Address {
Street: string;
}
}
import D = Demo;
function greeter(person: string) {
return "Hello, " + person;
}
function test(a: D.Address)
{
}
I get this Error :
20 The property 'Address' does not exist on value of type 'Demo'.
Upvotes: 0
Views: 48
Reputation: 7641
You should "export" class/interface to use it:
module Demo {
export interface Address {
Street: string;
}
}
Upvotes: 1