Skip to content

Add support for private functions #25

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
Evgenus opened this issue Aug 11, 2014 · 4 comments
Closed

Add support for private functions #25

Evgenus opened this issue Aug 11, 2014 · 4 comments

Comments

@Evgenus
Copy link

Evgenus commented Aug 11, 2014

functions and other entities (interfaces, classes, variables). Yes, there is no private classes and functions in typescript. But it could be specified in comments with @private tag. It is widespread case for type definition of some javascript code to hint preferred way to use it.

In example above @private tag was specified and displayed in function description but it has no effect on filtering.

@Evgenus Evgenus changed the title Add support for private function Add support for private functions Aug 11, 2014
@sebastian-lenz
Copy link
Member

Interesting, I planned to add support for @protected which currently does not exist in TypeScript. You are right, being able to mark classes or functions as private is interesting to. I'll have a look at this.

@Evgenus
Copy link
Author

Evgenus commented Aug 11, 2014

Interesting. Are you sure about this? I can't found @protected tag in jsdoc manual https://code.google.com/p/jsdoc-toolkit/wiki/TagReference . Do you have some alternative source of tags?

BTW, join my crusade at typescript repository microsoft/TypeScript#407 about jsdoc documentation support 😉

@sebastian-lenz
Copy link
Member

No, I don't follow any guideline when introducing tags, each documentation tool uses it's own set of tags. TypeDoc reflects all tags you put in your doc comments in the output, only a few tags like @param or ``@returns` have a special meaning and are processed in a special way.

There are other documentation utilities that support @protected, e.g.http://usejsdoc.org/tags-protected.html and I've seen several discussions on the TypeScript forums that demand the protected keyword to be part of the language specification (I personally do so too).

I'll leave a comment at the other issue. I've stumbled upon this problem and TypeDoc implements a similar functionality like you are describing for function overloads.

@sebastian-lenz
Copy link
Member

Starting with the next version 0.2.3 of TypeDoc you can change the access level of declarations using @private and @protected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants