Function checkValidPage

  • Checks if a value is a valid Page number.

    Parameters

    • x: unknown

      The value to check

    Returns asserts x is Page

    When the value is not an integer

    When the value is not within valid page range (1 to numPages)

    This is a type assertion function that ensures a value is a valid Page number