Options
All
  • Public
  • Public/Protected
  • All
Menu

FocusSystem can register and manage unique focuses and icons which there are.

collboard-system

Hierarchy

  • AbstractSystem
    • FocusSystem

Index

Constructors

  • new FocusSystem(systems: ISystemsExtended): FocusSystem
  • Parameters

    • systems: ISystemsExtended

    Returns FocusSystem

Properties

focusScopes: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended

Accessors

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

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

Methods

  • addSubdestroyable(...subdestroyable: ITeardownLogic[]): FocusSystem
  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns FocusSystem

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • 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>

  • getAllFocusScopes<TIdentification>(): Record<FocusScopeName, FocusScope<TIdentification>>
  • Type parameters

    • TIdentification

    Returns Record<FocusScopeName, FocusScope<TIdentification>>

  • getFocus<TIdentification>(focusName: string): FocusScope<TIdentification>
  • Type parameters

    • TIdentification

    Parameters

    • focusName: string

    Returns FocusScope<TIdentification>

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

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

    Parameters

    • obj: any

    Returns obj is IDestroyable