我在编译代码时遇到错误 import * as moment from "moment"; 编译错误 ERROR in [at-loader] ./project/src/common/common.factory.spec.ts:72:40 TS2709: Cannot use namespace 'moment' as a type. 有什么建议请提出来。
我目前正在编译一个typescript文件,该文件在index.ts中包含以下内容 export { default as Button } from './component/Button';
export type { Icon } from './component/Button'; 我目前正在导出Icon的声明,因为我将在另一个文件中重用它。 当通过lerna命令lerna run build编译它时,我得到了如下结果: ../../node_modules/@types/node/console.d.ts:35:37 - error TS2709: