Options
All
  • Public
  • Public/Protected
  • All
Menu

FakeClosePreventionSystem is a implementation of IClosePreventionSystem which implements the interface but does nothing

collboard-modules-sdk

Hierarchy

  • Destroyable
    • FakeClosePreventionSystem

Implements

  • IClosePreventionSystem

Index

Constructors

Accessors

  • get canBeClosed(): boolean
  • Returns boolean

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

Methods

  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns FakeClosePreventionSystem

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • destroy(): Promise<void>
  • Returns Promise<void>

  • registerClosePrevention(...reasons: IClosePreventable[]): Registration
  • Parameters

    • Rest ...reasons: IClosePreventable[]

    Returns Registration

  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable