Hierarchy

  • Precondition
    • ContextPrecondition

Constructors

Properties

enabled: boolean

Whether or not the piece is enabled.

location: PieceLocation

The location metadata for the piece's file.

name: string

The name of the piece.

options: PreconditionOptions

The raw options passed to this Piece

position: null | number
store: PreconditionStore

The store that contains the piece.

Accessors

  • get container(): Container
  • A reference to the Container object for ease of use.

    Returns Container

    container

Methods

  • Constructs a PreconditionError with the precondition parameter set to this.

    Parameters

    • Optionaloptions: Omit<Options, "precondition">

      The information.

    Returns PreconditionResult

  • Returns PreconditionResult

  • Per-piece listener that is called when the piece is loaded into the store. Useful to set-up asynchronous initialization tasks.

    Returns unknown

  • Per-piece listener that is called when the piece is unloaded from the store. Useful to set-up clean-up tasks.

    Returns unknown

  • Reloads the piece by loading the same path in the store.

    Returns Promise<void>

  • Defines the JSON.stringify behavior of this piece.

    Returns PieceJSON

  • Unloads and disables the piece.

    Returns Promise<void>