[英]How can I export everything from a third party JavaScript library in my own library?
I'm wrapping a third party JS library with my own TS code.我正在用我自己的 TS 代码包装第三方 JS 库。 Up until know I've been importing and exporting components ad-hoc.
直到知道我一直在临时导入和导出组件。
index.ts:索引.ts:
import { Button } from 'third-party'
export { Button }
Can I just export everything from the library?我可以从库中导出所有内容吗? I tried
export * from 'third-party'
but this didn't work.我尝试
export * from 'third-party'
但这没有用。
EDIT The error I'm seeing is编辑我看到的错误是
Module ... has no exported member ...
您可以尝试使用namespace
导出
export * as utils from 'third-party'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.