@class

May 18, 2022 0 Comments

Table of Contents

  • Synonyms
  • Syntax
  • Overview
  • Examples
  • Related Links

Synonyms

@constructor

Syntax

@class [<type> <name>]

Overview

The @class tag marks a function as being a constructor, meant to be called with the new keyword to return an instance.

Examples

A function that constructs Person instances.
/**
 * Creates a new Person.
 * @class
 */
function Person() {
}

var p = new Person();

@constructs