Returns the size of the window.

  • Type Parameters

    • Size extends ISize = ISize

      The type of the size object.

    Parameters

    • Optionaloptions: Partial<IParams<Size>>

      Optional configuration options.

      • debounce

        The delay in milliseconds for debouncing the resize event. Default is RESIZE_DEBOUNCE.

      • compute

        A function that computes the size object from the window size. Default is (size) => size as Size.

      • onResize

        A callback function to be called when the window size changes.

    Returns Size

    The size of the window.