Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Structure<TModel, TContainer>

Type parameters

Hierarchy

Implements

Index

Constructors

  • new Structure<TModel, TContainer>(_model: AbstractModel, structureTypeName: string, id: string, _isPartial?: boolean, container?: null | IContainer): Structure<TModel, TContainer>

Properties

id: string
structureTypeName: string

Accessors

  • get container(): TContainer
  • get isLoaded(): boolean
  • get model(): TModel

Methods

  • delete(): void
  • Deletes a model from the model. This will automatically remove the item from its model parent, and update incoming references and send server changes.

    Returns void

  • getContainerAs<T>(containerType: any): T
  • Type parameters

    Parameters

    • containerType: any

    Returns T

  • toJSON(): IStructureJSON
  • Renders the structure as plain JSON (without observables magic). This is intended for debugging and development convenience. Note that the resulting object is not of the interface type corresponding to this structure.

    Returns IStructureJSON

  • traverse(visit: (structure: IStructure) => void): void
  • Traverses this structure by calling the provided visitor function on itself and all the structures contained (as part) by it, in depth-first order, and it returns synchronously after that.

    Parameters

    Returns void

  • traverseFind<T>(visit: (structure: IStructure) => T): null | T
  • Traverses this structure, returning immediately when visit returns something other than null.

    Type parameters

    • T

    Parameters

    Returns null | T

  • traversePublicParts(visit: (structure: IStructure) => void): void

Generated using TypeDoc