NodeJS Typedoc错误:试图设置未声明的选项(模式)

1szpjjfi  于 2023-06-22  发布在  Node.js
关注(0)|答案(1)|浏览(105)

安装typedoc:

npm install typedoc --save-dev

然后在tsconfig.json中添加typedocOptions:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    // ...some lines there
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ],
    "emitDecoratorMetadata": true
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true
  },
  "typedocOptions": {
    "mode": "modules",
    "out": "docs"
  }
}

那我就做了

npx typedoc --out docs src/index.ts

并得到错误:

Error: Tried to set an option (mode) that was not declared.

我该怎么解决?

ny6fqffe

ny6fqffe1#

从v0.20.0起,mode选项已被删除,如release notes中所述。完整的选项列表可以在documentation中看到。
相关文章here

相关问题