Handle self written types definition in TypeScript project
问题 In my React project using TypeScript I wrote some types definition that I need to reuse in many other files like for example the type: type TIconName = 'menu' | 'shop' | 'user' To make this type available in all my project I use a types.ts file that lies at the root and that export all my types: /types.ts export type TIconName = 'menu' | 'shop' | 'user' ... So now I'm able to import all the types like this one in all my files with only one import: /component/icon/Icon.tsx import { TIconName,