0
我想要獲得一個非常基本的Hello world,在Typescript & Visual Studio 2012上工作。在測試方法中,我想聲明模塊中某個接口的參數。我錯過了什麼?VisualScript 2012中的Typescript hello世界錯誤
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)
{
}
我得到這個錯誤:
20屬性 '地址' 不會對類型的值 '示範' 存在。