Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Component

classdesc

Class representing a component.

Hierarchy

  • Component

Index

Constructors

Accessors

Methods

Constructors

constructor

Accessors

data

  • get data(): any
  • set data(data: any): void
  • description

    Get the component's data.

    readonly

    Returns any

    • The component's data
  • description

    Set the component's data. Note: This method differs from .mergeData() in that it completely overwrites any existing data within the component.

    Parameters

    • data: any

      Data object to apply

    Returns void

    • The component's updated updated data object

json

  • get json(): string
  • description

    Get the component's data as a JSON string.

    readonly

    Returns string

    • The component's data as a JSON string

type

  • get type(): string
  • set type(type: string): void
  • description

    Get the component's type.

    readonly

    Returns string

    • The component's type
  • description

    Set the component's type.

    Parameters

    • type: string

      New type for the component

    Returns void

    • The component's type

uuid

  • get uuid(): string
  • description

    Get the component's UUID.

    readonly

    Returns string

    • The component's UUID

Methods

clone

copy

  • description

    Copy another component's data, resetting existing data.

    Parameters

    Returns void

mergeData

  • mergeData(data: any): any
  • description

    Merge a data object into this component.

    Parameters

    • data: any

      JSON data to apply to the component

    Returns any

    • Updated data object/array

Generated using TypeDoc