【问题标题】:Typedoc Error: Tried to set an option (mode) that was not declaredTypedoc 错误:尝试设置未声明的选项(模式)
【发布时间】:2021-05-16 07:17:11
【问题描述】:

我安装了 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.

我该如何解决?

【问题讨论】:

    标签: javascript node.js typescript npm typedoc


    【解决方案1】:

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

    相关问题here

    【讨论】:

      猜你喜欢
      • 2015-02-20
      • 1970-01-01
      • 2021-10-28
      • 1970-01-01
      • 2021-10-28
      • 1970-01-01
      • 2017-08-16
      • 2012-07-28
      • 1970-01-01
      相关资源
      最近更新 更多