Skip to content

Not exporting interfaces in modules #3

@AdamHarte

Description

@AdamHarte

I have the following file I want to create docs from:

test-lib.d.ts

declare module "test-module" {
    interface TestOptions {
        token: string;
    }
    export function create(options: TestOptions): void;
}

I am using the following config:

{
    "source": {
        "includePattern": "(\\.d)?\\.ts$"
    },
    "plugins": [
        "node_modules/ts2jsdoc/plugin.js"
    ],
    "opts": {
        "template": "node_modules/ts2jsdoc/template"
    }
}

Then I run this command to generate my docs:
jsdoc -c conf.json test-lib.d.ts

When I navigate to the TestOptions interface in the generated docs, it is just a blank page, no mention of the token property at all.

If I have the interface at root level (outside the module) then the property shows in the docs. Seems like it doesn't like interfaces inside modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions