Skip to main content

Tags Overview

JSDoc recognises over 60 block tags and 2 inline tags. They fall into logical groups based on what they document.

Block tags

Core documentation

TagDescription
@paramDocument a function parameter
@returnsDocument the return value
@yieldsDocument the value yielded by a generator
@throwsDocument an exception that may be thrown
@typeDocument the type of a symbol
@typedefDefine a custom type
@propertyDocument a property of an object
@enumDocument a collection of related constants
@callbackDocument a callback function type
@constantDocument a constant value
@descriptionProvide a description (when not at the top of the block)
@summaryA short summary, separate from the full description
@exampleAn inline code example
@defaultDocument a symbol's default value

Classes & Functions

TagDescription
@classMark a function as a class constructor
@classdescA description that applies to the class, not its constructor
@constructsThe function creates instances of the given class
@functionDocument a symbol as a function
@interfaceDocument an interface type
@mixinDocument a mixin object
@moduleDocument a JavaScript module
@namespaceDocument a namespace object
@memberDocument a member of a symbol
@eventDocument an event
@thisDocument what this refers to inside a function

Access & Visibility

TagDescription
@accessSpecify the access level of a symbol
@privateMark a symbol as private
@protectedMark a symbol as protected
@publicMark a symbol as public
@packageMark a symbol as package-private
@innerMark a symbol as an inner member
@instanceMark a symbol as an instance member
@staticMark a symbol as a static member
@globalMark a symbol as globally scoped
@readonlyMark a symbol as read-only

Relationships

TagDescription
@augmentsIndicate that a symbol inherits from a parent
@implementsIndicate that a symbol implements an interface
@mixesIndicate that a symbol mixes in members of another
@borrowsIndicate that a symbol uses the documentation of another
@lendsLend the properties of an object literal to a class
@memberofSpecify the parent symbol of a symbol
@aliasTreat a symbol as if it had a different name
@firesDocument events emitted by a function
@listensDocument events listened to by a symbol

Metadata

TagDescription
@authorDocument the author of a symbol
@versionDocument the version of a symbol
@sinceDocument when a symbol was added
@deprecatedMark a symbol as deprecated
@licenseDocument the software licence
@copyrightDocument copyright information
@todoDocument tasks to complete
@seeRefer to another symbol or resource
@requiresDocument a required module
@asyncMark a function as asynchronous
@generatorMark a function as a generator

Document control

TagDescription
@abstractMark a method as abstract (must be implemented by subclasses)
@overrideMark a method as overriding a parent class method
@hideconstructorHide the constructor from the documentation
@ignoreExclude a symbol from documentation output
@inheritdocInherit documentation from the parent class
@variationDisambiguate symbols with the same name
@kindSpecify the kind of a symbol
@nameSpecify the name of a symbol
@exportsDocument the member that a module exports
@externalDocument an external type or class
@fileDescribe a file

Inline tags

Inline tags appear inside description text, wrapped in {curly braces}.

TagDescription
{@link}Create a hyperlink to another symbol or URL
{@tutorial}Create a link to a tutorial

Other

TagDescription
@tutorialLink to a tutorial from a symbol's documentation

Official reference: Official JSDoc reference