Interface DisposableStore

Hierarchy

Methods

  • Invoke the executor function and add the returned DisposableType to the store.

    Do nothing if the DisposableType is already in the store.

    Returns

    The returned DisposableType.

    Type Parameters

    Parameters

    • executor: (() => T)

      A function that returns a DisposableType.

        • (): T
        • Returns T

    Returns T

  • Invoke the executor function and add the returned DisposableType to the store.

    Do nothing if null | undefined is returned or the returned DisposableType is already in the store.

    Returns

    The returned DisposableType, or undefined if the executor returns null.

    Type Parameters

    Parameters

    • executor: (() => undefined | null | void | T)

      A function that returns either a DisposableType or null.

        • (): undefined | null | void | T
        • Returns undefined | null | void | T

    Returns void | T

  • Invoke the executor function and add each DisposableType in the returned array to the store.

    Do nothing if a DisposableType is already in the store.

    Returns

    The returned array of DisposableTypes.

    Type Parameters

    Parameters

    • executor: (() => T)

      A function that returns an array of DisposableTypes.

        • (): T
        • Returns T

    Returns T

  • Invoke the executor function and the returned DisposableTypes to the store. Do nothing if undefined | null is returned.

    Do nothing if a DisposableType is already in the store.

    Returns

    The returned array of DisposableTypes, or undefined if the executor returns undefined | null.

    Type Parameters

    Parameters

    • executor: (() => undefined | null | void | T)

      A function that returns either an array of DisposableTypes or undefined | null.

        • (): undefined | null | void | T
        • Returns undefined | null | void | T

    Returns void | T

  • Invoke the executor function and the returned DisposableTypes to the store. Do nothing if undefined | null is returned.

    Do nothing if a DisposableType is already in the store.

    Returns

    The returned array of DisposableTypes, or undefined if the executor returns undefined | null.

    Type Parameters

    Parameters

    • executor: (() => undefined | null | void | T | T[])

      A function that returns either an array of DisposableTypes or undefined | null.

        • (): undefined | null | void | T | T[]
        • Returns undefined | null | void | T | T[]

    Returns void | T | T[]