【问题标题】:Why does typedoc ignore my interface declaration?为什么 typedoc 会忽略我的接口声明?
【发布时间】:2021-12-03 19:32:17
【问题描述】:
type S=string|undefined;
declare global {
    export interface String {
        /**
         * returns string between borders
         * @param   borderA - left border
         * @param   borderB - right border
         * @param aIsFirst - true if borderA is first, false if is last
         * @param bIsFirst - true if borderB is first, false if is last
         */
        between(borderA:S, borderB:S, aIsFirst:boolean, bIsFirst:boolean):S;
    }
}

typedoc 命令:typedoc --out ./documentation/ src/

它生成带有 HTML 的文件夹,取自 README.md,但在那里找不到我的界面的痕迹...

【问题讨论】:

  • 对同一件事非常好奇。我的错误是Block, defined at src/types/block.types.ts:2, is referenced by EssentialEth.getBlock.getBlock but not included in the documentation.

标签: typescript typedoc


【解决方案1】:

TypeDoc 只会记录由您的入口点之一导出的内容。如果您导出 Foo 而不是 IFoo,您将收到一个错误,指出它已使用“但未包含在文档中”...

https://github.com/TypeStrong/typedoc/issues/1739

【讨论】:

    猜你喜欢
    • 2020-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多