Typescript文件为空导致出现问题

Typescript文件为空导致出现问题,typescript,Typescript,我试图删除该文件,但错误消息没有消失。我解决这个问题的唯一方法是导出文件,然后导入到我的app.tsx文件中 Failed to compile /Users/steven/react-typescript-todolist/src/components/Todo.tsx TypeScript error in /Users/steven/react-typescript- todolist/src/components/Todo.tsx(undefined,undefined): 'Todo

我试图删除该文件,但错误消息没有消失。我解决这个问题的唯一方法是导出文件,然后导入到我的app.tsx文件中

Failed to compile
/Users/steven/react-typescript-todolist/src/components/Todo.tsx
TypeScript error in /Users/steven/react-typescript- 
todolist/src/components/Todo.tsx(undefined,undefined):
'Todo.tsx' cannot be compiled under '--isolatedModules' because it is considered a global 
 script file. Add an import, export, or an empty 'export {}' statement to make it a module. 
TS1208
 This error occurred during the build time and cannot be dismissed.
有人能解释一下为什么会出现这个错误,为什么删除文件不能解决这个问题吗