Typedoc 错误:试图设置一个未声明的选项模式

问题描述

我安装了 typedoc:

npm install typedoc --save-dev

然后将 typedocoptions 添加到 tsconfig.json 中:

{
  "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.

我该如何解决

解决方法

release notes 中所述,mode 选项已从 v0.20.0 中删除。 可以在 documentation 中查看完整的选项列表。

相关问题here