Doclets
July 1, 2026 ยท View on GitHub
All regular rules of JSDoc apply to Highcharts doclets. Highcharts doclets also use custom tags to document the Highcharts options tree.
The custom implementations have the following requirements:
-
The
@internal(or its legacy alias@private) tags should be the first or last tags in doclets. -
The tags
@apioptionand@optionparenthave to come last in a doclet. Exception to this rule are@internaland@privatetags. -
All non-basic types have to be defined with
@callback,@class,@interfaceor@type. -
All non-basic types have to begin with
Highcharts.. -
A doclet with
@optionparenttag has to be followed by a line with opening curly bracket. -
@extendswill merge from a set of options into the@optionparent. Default values will be not inherited. Also@extendsdoes not work with@apioption. -
@productdescadds additional product-specific information to the initial doclet text. The first word following the tag has to be the product key in curly brackets. -
@sinceand@deprecatedsupport usage ofnextas the version number that is resolved on the next release when the next code version is known. When used in a public doclet - any block comment starting with/**that do not have@internal(nor its legacy alias@private) tag, must have a value - a version number ornext. This is guarded by@highcharts/highcharts/doclet-versioned-tagseslint rule. -
@basicflags an option as commonly used within its parent option, referring to the option itself, not to its type. Currently applied toid,index,name,type,className,color,events, anddata. -
@defaultand@sampletags support product-specific values. The first word following the tag has to be the product key in curly brackets. Multiple products can be separated by|. E.g.@default {highcharts|highstock} 0,@sample {highcharts|highstock} demo/chart/polar.
Documenting TypeScript native types
When documenting a TS type, interface, or class some additional rules apply:
-
All internal types and doclets must be tagged with
@internal. -
Do not use
@typein the doclet - the type is already set in code. -
Doclet placed on an interface or class should be about the interface or class itself, not the related API option that is using it.
-
@extendsand@excludingtags should be replaced with proper changes to the types. Tag@extendsis to be resolved viaextendskeyword. Tag@excludingis to be resolved viapropX?: undefined;for optional properties orOmittype when ancestry line between new interface and old is not needed (in general, if you want to pass either of the interfaces through a common function or processing, then you care about the ancestry and don't want to useOmit). Example:
Interface with the tags (so the resolving them is still a todo task).
/**
* An example of options object.
*
* @extends xAxis
* @excluding linkedTo, maxZoom
*/
interface FakeAxis { ...props... }
Interface without the tags.
interface FakeAxis extends Axis {
...props...
/* *
*
* Excluded
*
* */
linkedTo?: undefined;
maxZoom?: undefined;
}