QA

发布于: 8/16/2022 阅读大约需要0分钟

1. 打包为空

// file a.ts
export function foo (str: string) {
  console.log(str)
}

// file b.ts
export * from 'a'

// file index.ts
export * from 'b'

// build
tsc index.ts

2. 如何直接运行TypeScript Node文件

ts-node index.ts

3. 如何直接运行monorepo中引用了其他NodeJS项目的 TS文件

NodeJSmonorepo

ts-node -r tsconfig-paths/register index.ts