簡體   English   中英

Typedoc 錯誤:嘗試設置未聲明的選項(模式)

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

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

我該如何解決?

從 v0.20.0 開始, mode選項已被刪除,如發行說明中所述。 完整的選項列表可以在文檔中看到。

相關問題在這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM