[英]How to export all functions from typescript file with default?
Common example of this export type is React.这种导出类型的常见示例是 React。 We can use this:
import React, {Component} from "react"
.我们可以使用这个:
import React, {Component} from "react"
。 And then we can use both React.Component and Component.然后我们可以同时使用 React.Component 和 Component。 How to achieve this?
如何做到这一点?
CommonJS
in tsconfig.json
tsconfig.json
中有模块CommonJS
export = <YOUR MODULE NAME>
to the end of your fileexport = <YOUR MODULE NAME>
添加到文件末尾
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.