Stegripe Monorepo Packages
    Preparing search index...

    Class ContextPreconditionAbstract

    Hierarchy

    • Precondition
      • ContextPrecondition
    Index

    Constructors

    • Parameters

      • context: LoaderContext
      • Optionaloptions: PreconditionOptions

      Returns ContextPrecondition

    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: number | null
    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>