天道酬勤,学无止境

typedoc

Linking to external library documentation with TypeDoc

I have a TypeScript project, and I'm using TypeDoc to generate documentation for it. In my project I am using an external library that has its own existing documentation. In the TypeDoc output for my project I want to link the reader to the documentation for the external library without having to manually insert a URL. The closest I've come to a solution is placing double brackets in the code comments around what I want to link to, like this: /** I want to link to something called [[Foo]] */ But this doesn't seem to work for types in an external library. Is this possible to achieve?

2022-04-06 09:21:55    分类:问答    javascript   typescript   typedoc

TypeDoc 找不到 Angular2 模块(TypeDoc can not find Angular2 modules)

问题 我正在尝试使用 TypeDoc 生成 doc 文件。 当我使用以下命令运行 TypeDoc 时: /node_modules/.bin/typedoc --module system --target ES5 --exclude *.spec.ts* --experimentalDecorators --out typedoc app/ --ignoreCompilerErrors 它作为输出给出: Using TypeScript 1.6.2 from /development/node_modules/typedoc/node_modules/typescript/lib Error: /development/app/angular2/app.ts(1) Cannot find module 'angular2/core'. Error: /development/app/angular2/app.ts(2) Cannot find module 'angular2/upgrade'. Error: /development/app/angular2/app.ts(3) Cannot find module 'angular2/platform/browser'. Error: /development/app/angular2/app.ts(5) tsconfig

2022-01-16 02:37:08    分类:技术分享    angular   typescript   typedoc

TypeDoc can not find Angular2 modules

I am trying to generate doc files by using TypeDoc. When I run TypeDoc with the follwing command: /node_modules/.bin/typedoc --module system --target ES5 --exclude *.spec.ts* --experimentalDecorators --out typedoc app/ --ignoreCompilerErrors It gives as output: Using TypeScript 1.6.2 from /development/node_modules/typedoc/node_modules/typescript/lib Error: /development/app/angular2/app.ts(1) Cannot find module 'angular2/core'. Error: /development/app/angular2/app.ts(2) Cannot find module 'angular2/upgrade'. Error: /development/app/angular2/app.ts(3) Cannot find module 'angular2/platform

2022-01-15 21:32:48    分类:问答    angular   typescript   typedoc

TypeDoc 抱怨“找不到模块”(TypeDoc complains “Cannot find module”)

问题 我有一个基于 Typsecript 的 React 应用程序。 它工作正常,但我想将 TypeDoc(想想 Typescript 的 JSDoc)添加到混合中。 安装后,我从命令行运行它(在我测试时只处理一个文件): typedoc --module commonjs --jsx react --out ../docs/ ./src/components/404/404.tsx 我收到一个错误: Error: /path/to/project/src/components/404/404.tsx(0) Cannot find module 'react'. 实际上,React 已安装。 我曾尝试运行全局和本地安装的 TypeDoc,但没有任何区别(认为全局安装可能无法找到正确的 node_modules)。 该应用程序从 Typescript 编译并运行良好......没有关于缺少模块或类型定义的抱怨......只是无法通过 TypeDoc 工作。 有什么建议么? 似乎为了在基于 Typescript 的 React 项目中生成文档,TypeDoc 是镇上唯一的游戏,所以我有点卡住了。 回答1 可能对你有帮助: 'node ./node_modules/typedoc/bin/typedoc ' + (path || './src/scripts/') + '-

2021-09-30 18:12:11    分类:技术分享    reactjs   typescript   documentation   typedoc

publishing a typescript library on npm: exported symbols, modules

I'm writing a typescript library which I intend to publish on npm. It is meant to run in node only, never in the browser. It will make sense to use the library only from typescript (I'm not expecting any Javascript users). I have trouble finding guides how to publish typescript-for-typescript libraries on npm (also, these things seem to be changing rapidly in the typescript world). Should I wrap all my code in a module? (I don't feel the need for modules in the library itself, it's currently only at around 1000 LOC). Should I create an index.ts file? I think I should ship .js, .js.map and .d

2021-08-11 12:19:17    分类:问答    typescript   typedoc

TypeDoc complains “Cannot find module”

I have a Typsecript based react app. It works fine but I want to add TypeDoc (think JSDoc for Typescript) to the mix. After installing it I run this from the command line (only processing a single file as I test this): typedoc --module commonjs --jsx react --out ../docs/ ./src/components/404/404.tsx and I get an error: Error: /path/to/project/src/components/404/404.tsx(0) Cannot find module 'react'. React is, in fact, installed. I have tried running TypeDoc installed globally and locally and it makes no difference (thought maybe the global install was unable to find the correct node_modules)

2021-06-15 13:30:16    分类:问答    reactjs   typescript   documentation   typedoc