简体   繁体   English

如何从我自己的库中的第三方 JavaScript 库中导出所有内容?

[英]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.

相关问题 我可以在GWT中使用第三方Javascript库吗? - Can I use a third party Javascript library in GWT 从第三方库导入javascript模块 - importing javascript modules from a third party library 如何实现第三方Javascript库? - How to implement Third Party Javascript Library? 使用第三方库(peasycam)将导出处理为javascript - Processing export as javascript with a third-party library(peasycam) 如何检查我的公共API的XMLHttpRequest是来自我自己的webapp还是来自第三方客户端(以确保优先级)? - How can I check if an XMLHttpRequest to my public API is from my own webapp or from a third-party client (to ensure priority)? 我可以使用parcelJS从JavaScript库导入所有内容吗? - Can I import everything from a javascript library with parcelJS? 如何使第三方Vue库可以访问正在使用的其他第三方Vue插件? - How can I make a third party Vue library have access to other third-party Vue plugins being used? 使用内联 JavaScript 从 cdn 导入第三方库 - import third-party library from cdn using inline JavaScript 如何在cordova插件中包含第三方javascript nodejs库? - How to include third-party javascript nodejs library in cordova plugin? 如何在离子应用程序中包含javascript第三方库? - How to include javascript third party library in ionic app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM