我想重新导出模块中的所有类型。有办法实现这一点吗?
我确实尝试过:
export type * from 'react-router-dom';
Run Code Online (Sandbox Code Playgroud)
但它不起作用:
只有命名导出可以使用“导出类型”。TS(1383)
Typescript 5.0 现在支持此功能:
\nexport type * from "external-module"\n\n//OR\n\nexport type * as ns from "external-module".\nRun Code Online (Sandbox Code Playgroud)\n更新打字稿,你\xe2\x80\x99就可以了!
\n| 归档时间: |
|
| 查看次数: |
2964 次 |
| 最近记录: |