typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Internal links in documentation

Open mudHOAX opened this issue 11 years ago • 10 comments

Is there any way of declaring an internal reference to a part of the documentation via a comment block.

e.g.

/**
 * Some function that does something. Also see {@link someOtherFunction}.
 */
public someFunction(): void {
    ...
}

mudHOAX avatar Feb 05 '15 12:02 mudHOAX

At typedoc.io it is said you can use double angle brackets, but I didn't manage to make it work.

awerlang avatar Feb 06 '15 18:02 awerlang

You should be able to create an internal link like this:

/**
 * Some function that does something. Also see [[someOtherFunction]].
 */
public someFunction(): void {
    ...
}

If it doesn't work for you it would be great if you could share the source code so I can have a look at this one.

sebastian-lenz avatar Feb 07 '15 16:02 sebastian-lenz

It is working for same class members and to link to another class.

How to link to another class' member?

interface Entity {
   id: number;
}
class EntityService {
    /**
     * @param id   see [[Entity.id]]
     */
    get(id: number) {...}
}

awerlang avatar Feb 07 '15 17:02 awerlang

Yes, this is the intended way. I've created a test case and noticed that the text gets linked to a wrong target. Do you see the same effect or does the text gets not linked for you at all?

sebastian-lenz avatar Feb 07 '15 17:02 sebastian-lenz

Text becomes a link to \undefined

awerlang avatar Feb 07 '15 18:02 awerlang

I've included two small bugfixes in 0.2.3, do the links work now?

sebastian-lenz avatar Feb 08 '15 17:02 sebastian-lenz

It is working now! Thanks!

awerlang avatar Feb 08 '15 23:02 awerlang

I can confirm that this now works as expected. Thanks for looking into this :+1:

mudHOAX avatar Feb 09 '15 09:02 mudHOAX

Great, thank you for testing it!

sebastian-lenz avatar Feb 09 '15 12:02 sebastian-lenz

How would I declare a reference to a static and a instance member? I've tried [[Class:method]] [[Class::method]] [[Class#method]]. If there's a static and instance method with the same name, [[Class.method]] creates a link to the static method.

janispritzkau avatar Oct 04 '16 17:10 janispritzkau