Skip to content

@category not working for functions within modules #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
geethika18 opened this issue Nov 20, 2018 · 14 comments
Closed

@category not working for functions within modules #904

geethika18 opened this issue Nov 20, 2018 · 14 comments
Labels
needs reproduction Needs a minimal reproducible case - https://gist.github.com/Rich-Harris/88c5fc2ac6dc941b22e7996af05d

Comments

@geethika18
Copy link

Requirement
Within a module, there should be a way to classify/categorize the functions - ex: content creation functions, content editing functions etc.

Tried out something similar to what was mentioned in #566

But @category tag was taking effect only on classes.

@aciccarello
Copy link
Collaborator

Am I correct to assume by module you are referring to a file defined similar to the below?

/**
 * @category SomeCategory
 **/
function myFunction() {
}

Related to #866

@aciccarello aciccarello added the needs reproduction Needs a minimal reproducible case - https://gist.github.com/Rich-Harris/88c5fc2ac6dc941b22e7996af05d label Nov 20, 2018
@geethika18
Copy link
Author

Hi @aciccarello,

I have a ts file defined as below

namespace ABC{

/**

/**

  • @category abc.2
    */
    export function2() {
    }
    ...
    }

My requirement is to have these categories produce different pages or even different sections within the same page. Please help me out with the same.

@geethika18
Copy link
Author

Can I get some help here?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 27, 2018

I don't believe this is supported with the default theme yet, #866 might resolve this.

@jonchardy
Copy link
Contributor

Yes, see #866. I'm willing to help make some changes here, but need some input on desired behavior.

@geethika18
Copy link
Author

Hi @jonchardy,

Thanks for volunteering. So here's my use case

test.txt

When typedoc is run the output should have 2 sections - category 1 and category 2 - all the methods should be grouped together based on category.

Thank you!

@geethika18
Copy link
Author

Hi @jonchardy ,

Any luck with this? Please let me know. Thanks.

@geethika18
Copy link
Author

Hi,

Could someone please help me out with this issue?

@geethika18 geethika18 reopened this Jan 4, 2019
@geethika18
Copy link
Author

Output generated

image

Expected output

image

The theme used is same, but in 2nd case I had to duplicate my input file which is basically a weird work-around. Please suggest me the right approach.

@jonchardy
Copy link
Contributor

See #938

@geethika18
Copy link
Author

geethika18 commented Jan 8, 2019

Hi @jonchardy ,

Could you kindly share the ETA for releasing this change?

@jonchardy
Copy link
Contributor

I don't know, I'm just a contributor. @aciccarello

@aciccarello
Copy link
Collaborator

Sorry, there is no ETA at the moment. The PR will need to be reviewed. Additionally there are some issues with releasing themes at the moment.

@geethika18
Copy link
Author

Hi @aciccarello ,

Could you please share the ETA for releasing this change? I see that the change is merged. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction Needs a minimal reproducible case - https://gist.github.com/Rich-Harris/88c5fc2ac6dc941b22e7996af05d
Projects
None yet
Development

No branches or pull requests

4 participants