最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Typedoc Error: Tried to set an option (mode) that was not declared - Stack Overflow

programmeradmin0浏览0评论

I installed typedoc:

npm install typedoc --save-dev

Then added typedocOptions into tsconfig.json:

{
  "pileOnSave": false,
  "pilerOptions": {
    "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?

I installed typedoc:

npm install typedoc --save-dev

Then added typedocOptions into tsconfig.json:

{
  "pileOnSave": false,
  "pilerOptions": {
    "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?

Share Improve this question asked Feb 12, 2021 at 14:23 mr_blondmr_blond 1,7303 gold badges27 silver badges58 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

The mode option has been removed as of v0.20.0 as described in the release notes. The full list of options can be seen in the documentation.

Related issue here

发布评论

评论列表(0)

  1. 暂无评论