简体   繁体   English

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

[英]Typedoc Error: Tried to set an option (mode) that was not declared

I installed typedoc:我安装了typedoc:

npm install typedoc --save-dev

Then added typedocOptions into tsconfig.json:然后将 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"
  }
}

Then I do:然后我做:

npx typedoc --out docs src/index.ts

And get the error:并得到错误:

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

How do I solve it?我该如何解决?

The mode option has been removed as of v0.20.0 as described in the release notes .从 v0.20.0 开始, mode选项已被删除,如发行说明中所述。 The full list of options can be seen in the documentation .完整的选项列表可以在文档中看到。

Related issue here相关问题在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Typedoc使用require语法抛出错误 - Typedoc throws error with the require syntax 尝试使用 javascript 导出 CSV 时,在严格模式下不允许分配给只读属性出现错误 - Assignment to read-only properties is not allowed in strict mode got error when tried to export CSV using javascript Vue 错误:在严格模式代码中,函数只能在顶层或块内声明 - Vue error: In strict mode code, functions can only be declared at top level or inside a block 如何在没有严格模式的情况下执行 deno? 错误:未捕获的 SyntaxError:标识符“列表”已被声明 - How to execute deno without strict mode ? Error: Uncaught SyntaxError: Identifier 'list' has already been declared 使用 typedoc 记录命名参数 - Document named parameters with typedoc TypeDoc创建空文档 - TypeDoc creating empty documentation 使用TypeDoc记录外部类型 - Documenting external types with TypeDoc 有没有办法在 typedoc 中描述一个字段? - Is there a way to describe a field in typedoc? 我试图设置我的 state,但它返回“无法在尚未安装的组件上调用 setState”。 错误 - I tried to set my state, but it returns “Can't call setState on a component that is not yet mounted.” error 警告:选项已用“否”前缀声明 - Warns: Option has been declared with a 'no' prefix
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM