lit.dev
lit.dev copied to clipboard
[docs/api] Directives documentations start with the ancestor class' description.
Directives which extend Directive class has the same
Base class for creating custom directives. Users should extend this class, implement render and/or update, and then pass their subclass to directive.
description.
Directives which extend AsyncDirective class has the same
An abstract
Directivebase class whosedisconnectedmethod will be called when the part containing the directive is cleared as a result of re-rendering, or when the user callspart.setConnected(false)on a part that was previously rendered containing the directive (as happens when e.g. a LitElement disconnects from the DOM).
description
Ah.. thanks for the report.
Looks like these might be caused by the export of the directive implementation classes, but since the classes themselves don't have jsdoc, they somehow go all the way down to the base class that does have jsdoc?
Listing all the class API of the directive implementations seems of dubious value since it's really just the directive that is meant to be pubic facing and used. I believe the class or the type of it is exported only to allow typescript to resolve the return type of the directive call. Perhaps this was always the intention too, as the table of contents of the directives API page never list those classes either.
We probably want to just filter those out during API doc generation.