typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Reference link is lost when merging namespace

Open fvoronin opened this issue 8 years ago • 2 comments

For example, we have two simple modules:

ObjectEditor.ts

import "Options";

class ObjectEditor  {
    static defaultOptions: ObjectEditorNs.Options = {
        title: undefined,
        type: undefined,
    }

    constructor(options?: ObjectEditorNs.Options) {
    }
}

export = ObjectEditor;

Options.ts

declare namespace ObjectEditorNs {
    export interface Options {
        title?: string;
        type?: string;
    }
}

And Typedoc's out:

class objecteditor

Constructor parametr has link to Option interface.

Lets add extension to Option interface

ObjectEditorExt.ts

declare namespace ObjectEditorNs {
	interface Options {
		skip?: boolean;
	}
}

And now Typedoc lose link to Option:

class objecteditor no link to options

fvoronin avatar Apr 04 '18 11:04 fvoronin

Yes, namespace merging does not work very well. This probably won't work with your project, but is a link created when using --mode modules? In file mode where would you expect the link to go to?

aciccarello avatar Apr 04 '18 13:04 aciccarello

Yes, we use --mode modules for our project. And I use it for that example. In file mode Typedoc generate link for constructor Options parameter in first case of the example. In second case, for extended Options, Typedoc miss again reference to Options interface description. But if we look at the Module ObjectEditorNs we saw Options interface

image

Thats has 3 properties, defined in 2 different files:

image

And it's look better than in modules mode result, where we have 2 separate Options description pages.

fvoronin avatar Apr 04 '18 17:04 fvoronin