【发布时间】:2019-07-29 12:04:38
【问题描述】:
我正在使用带有打字稿的 CRA (create-react-app myapp --typescript)
我的App.tsx 中有一些我想在外部存储的打字稿内容,我已经尝试创建App.d.ts、index.d.ts、module.d.ts,但都不起作用。
这是我正在使用的界面:
declare interface IArgs {
home: string,
away: string
}
我需要做什么才能在我的源文件可以共享的文件中声明我的所有 Typescript 内容?
【问题讨论】:
标签: reactjs typescript create-react-app