[英]TypeScript model export interface
I am new in TypeScript and I just want to ask about the code the (position) is from another model TypeScript because我是 TypeScript 的新手,我只想问一下(位置)来自另一个 model TypeScript 的代码,因为
All are in model folder:都在 model 文件夹中:
export interface Group {
name: string;
opportunities: Opportunity[];
}
opportunity.model.ts
export interface Opportunity {
name: string;
}
This is the content of my company.model.ts
in model folder这是我
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;
}
Thanks.谢谢。 I don't know what I'm doing.
我不知道我在做什么。
Without much more context if feels like you are looking for something like this:如果感觉你正在寻找这样的东西,那么没有更多的上下文:
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.