Function collect

  • Calls the passed function and returns the unsubscribe function from all signals and subscriptions created within it.

    Parameters

    • fn: (() => void)

      A function to call.

        • (): void
        • Returns void

    Returns (() => void)

    A cleanup function.

      • (): void
      • Returns void