[英]TypeScript model export interface
我是 TypeScript 的新手,我只想问一下(位置)来自另一个 model TypeScript 的代码,因为
都在 model 文件夹中:
export interface Group {
name: string;
opportunities: Opportunity[];
}
opportunity.model.ts
export interface Opportunity {
name: string;
}
这是我company.model.ts
model文件夹中model.ts的内容
export interface Company {
companyName: string;
position: opportunity; // my question is here? what should I put here,
// because the content of position is the
// opportunity which is like a dropdown
contactNumber: number;
}
谢谢。 我不知道我在做什么。
如果感觉你正在寻找这样的东西,那么没有更多的上下文:
export interface Group {
name: string;
opportunities: Opportunity[];
}
export interface Opportunity {
name: string;
}
export interface Company {
companyName: string;
position: Opportunity[]; // my question is here? what should I put here,
// because the content of position is the
// opportunity which is like a dropdown
contactNumber: number;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.