Nette only recognize persistent params as typed when they have default value.
Since users are allowed to set various static properties after the construction of VP,
we cannot set the default values and need to convert the params manually.
The VisualPaginator component has two persistent properties: $page and $itemsPerPage. In loadState method, they are assigned to the corresponding properties of Nette\Utils\Paginator. With strict_types on, this fails unless we manually convert the properties to int, which, while being a trivial modification, feels like something that our framework could spare us doing.
And indeed, it does convert the type for us when we set a default value. However, that is not always possible. We can assign the default value 1 for the $page property statically but the default value of $itemsPerPage depends on another property, $itemsPerPageList, which can be modified after the construction of VisualPaginator. In that case it is not right to set default value to some dummy number because then, the component could be internally inconsistent ($itemsPerPageList[$itemsPerPage] needs to exist).
Setting the type to ?int, Nette could easily convert the value of the persistent property in the background like it does with properties that have a default value set, allowing us to clean up the code slightly.