0
爲什麼我在運行時收到錯誤:TSDummyProject is not defined
?在運行時未定義的Typescript模塊
dbentities.d.ts:
declare module TSDummyProject.Models {
export class Part {
ID: number;
PartName: string;
...
}
}
manager.ts:
/// <reference path="dbentities.d.ts"/>
class PartManagerController {
private curPart: TSDummyProject.Models.Part;
...
someFunction(){
// error: TSDummyProject is not defined
this.curPart = new TSDummyProject.Models.Part();
}
}