Skip to content
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

What're the options for the requiredToBeDocumented option? #2402

Closed
electrovir opened this issue Sep 19, 2023 · 6 comments
Closed

What're the options for the requiredToBeDocumented option? #2402

electrovir opened this issue Sep 19, 2023 · 6 comments
Labels
question Question about functionality

Comments

@electrovir
Copy link

Search terms

  • requiredToBeDocumented
  • documentation
  • reflection

Question

I'm new to TypeDoc. I see that the requiredToBeDocumented option is documented here: https://typedoc.org/options/validation/#requiredtobedocumented. However, I do not see documentation for what values this option accepts or what they mean. So far I've determined the possible options by intentionally triggering this error message:

[error] 'X' is an invalid value for 'requiredToBeDocumented'. Must be one of: Project, Module, Namespace, Enum, EnumMember, Variable, Function, Class, Interface, Constructor, Property, Method, CallSignature, IndexSignature, ConstructorSignature, Parameter, TypeLiteral, TypeParameter, Accessor, GetSignature, SetSignature, TypeAlias, Reference

It seems weird to me that I have to provide an invalid value in order to even find out what the valid values are.

Even after discovering these values, I'm unsure what some of them mean. Obviously some are obvious, like Function, but others aren't (to me at least). For example, what is CallSignature? (I'm unsure of others as well, not just that one.)

@electrovir electrovir added the question Question about functionality label Sep 19, 2023
@electrovir
Copy link
Author

electrovir commented Sep 19, 2023

I've now found the possible values by browsing the API page (rather than the docs page): https://typedoc.org/api/interfaces/Configuration.TypeDocOptions.html#requiredToBeDocumented

(These values don't match the values reported from the error message above though? 🤔)

Still haven't found any explanations though.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 23, 2023

The API page unfortunately looks like it's also including all of TypeDoc's shortcuts which are unions of two or more reflection kinds (that enum is made up of increasing powers of two to allow such usage)

You're absolutely right that the docs are lacking here, updating!

Gerrit0 added a commit to TypeStrong/typedoc-site that referenced this issue Sep 23, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 23, 2023

How's this look? TypeStrong/typedoc-site@c191ef5

@electrovir
Copy link
Author

Wow thanks, that looks awesome! The only option that I'm still wondering about is Project, what does that correspond to?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 24, 2023

The top level reflection in your documentation is the Project, guess I should make a note about that too

There's only ever one, so it generally doesn't make sense to require it be documented (it also can only be documented if you have a single entry point)

@electrovir
Copy link
Author

Cool, thanks! All my questions have been answered for this then! 🥳

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

No branches or pull requests

2 participants