SymbolConstructor | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SymbolConstructor

Callable

  • __call(description?: string | number): symbol
  • Returns a new unique Symbol value.

    Parameters

    • Optional description: string | number

      Description of the new Symbol object.

    Returns symbol

Index

Properties

Methods

Properties

prototype

prototype: Symbol

A reference to the prototype.

Methods

for

  • for(key: string): symbol
  • Returns a Symbol object from the global symbol registry matching the given key if found. Otherwise, returns a new symbol with this key.

    Parameters

    • key: string

      key to search for.

    Returns symbol

keyFor

  • keyFor(sym: symbol): string | undefined
  • Returns a key from the global symbol registry matching the given Symbol if found. Otherwise, returns a undefined.

    Parameters

    • sym: symbol

      Symbol to find the key for.

    Returns string | undefined

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc