mr_*_*ond 3 javascript node.js npm typescript typedoc
我安装了 typedoc:
npm install typedoc --save-dev
Run Code Online (Sandbox Code Playgroud)
然后将 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"
}
}
Run Code Online (Sandbox Code Playgroud)
然后我这样做:
npx typedoc --out docs src/index.ts
Run Code Online (Sandbox Code Playgroud)
并得到错误:
Error: Tried to set an option (mode) that was not declared.
Run Code Online (Sandbox Code Playgroud)
我该如何解决?