【发布时间】:2023-01-14 06:05:57
【问题描述】:
我已经创建了多个接口,并希望从一个公共的 index.ts 文件中发送它们,如下所示:
--pages
------index.interface.ts
--index.ts
现在在我的index.ts 中,我正在导出如下内容:
export { timeSlots } from './pages/index.interface';
而我的index.interface.ts 看起来像这样:
export interface timeSlots {
shivam: string;
daniel: string;
jonathan: string;
}
现在,当我尝试这样做时,它告诉我:
Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.ts(1205)
不确定为什么会出现此错误,有人可以帮忙吗?
【问题讨论】:
标签: typescript