Skip to content

declare module vs @module different output #2401

@lal12

Description

@lal12

Search terms

module, declare module,

Question

Before I a .d.ts file was only as a way to document a library/environment.

So each file looked like this:

/**
* @module foo:bar
* This module can be imported to do something
*/
export function doSomething(a: any): void;

This resulted in the comment above being included and the page being called foo:bar.
However know I want to use those .d.ts also as reference in Typescript, so I need to wrap the whole file into a declare module:

/**
* @module foo:bar
* This module can be imported to do something
*/
declare module 'foo:bar'{
export function doSomething(a: any): void;
}

now however the page is title as (Module +) filename and the comment isn't included either.

How can I handle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions