Skip to content

Support @private for modules #62

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
hannes-o-brunner opened this issue Feb 9, 2015 · 7 comments
Closed

Support @private for modules #62

hannes-o-brunner opened this issue Feb 9, 2015 · 7 comments

Comments

@hannes-o-brunner
Copy link

Would it be possible to support the @Private or similar annoation also for modules? I do have the case where some utility functionality should only be accessible from my own code, but of course to be able to access it from outside I have to exported them but do not want to show them in the docu.

Current workaround is to mark all the exposed functionality with @Private, but this is tedious and the module itself still shows up.

@sebastian-lenz
Copy link
Member

This has a lot of implications. Is everything inside a private module private? Also a class with public properties? We actually already have this problem as a class can now be marked as private.

So what would you think of a @hidden tag that would remove the marked symbols from the documentation?

@hannes-o-brunner
Copy link
Author

That would be great.
And yes, in my opinion/case, if a module is hidden/private, all its features by definition are hidden as well.

@sebastian-lenz
Copy link
Member

I've added the @hidden tag so we can exclude individual symbols from the documentation. You can now also mark modules with @private. This will however not mark all children as being private, I currently see no point in doing so. Seems to confusing to me.

@liorocks
Copy link

liorocks commented Nov 4, 2015

Is it possible to hide parameters, that are only created with constructor?

class Example {

/***
 * Name Param - this will be hidden without a problem...
 * @hidden
 */
private name:string;

/***
 * @param name
 * @param age  - how to hide this param? 
 */
constructor(private name:string, private age:number){}
...

In the example above, how can I hide the age parameter, without creating it like the name param?
I tried to @hidden param age but it didn't work.

@sebastian-lenz
Copy link
Member

No, sorry there is no way to hide this member.

@iveetoo
Copy link

iveetoo commented Oct 18, 2016

@sebastian-lenz can you add the @hidden tag in the TypeDoc documentation, because I'm sure there other people searching for this feature.

@aciccarello
Copy link
Collaborator

@iveetoo This project is now mostly maintained by the community so someone will have to submit a PR to update the documentation. For those looking for a little more on @private see #25

#293 also added support for excluding private variables though I don't know if this affects the constructor.

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

6 participants