我有以下代码:
export interface ISubjectData {
goal: IGoal,
subjects: ISubject[]
}
export interface IChapterData {
subject: ISubject
chapters: IChapter[]
}
export interface ISubjectChapterData {
type: string,
data: ISubjectData | IChapterData
}
如何从以上界面中提取data.subjects
?