I hava function below:
const fetchList = ({ current = 1, pageSize = 10 } = {}) => {/*...*/}
fetchList() // invoke
In Typescript, I want make it typed, the only way I can do it like this:
const fetchList=({current = 1, pageSize = 10}?: {current?: number; pageSize?: number} = {}) => {/*...*/}
fetchList() // invoke
But I wannt make the function type declaration alone like this so it can be reused, then the function declaration get error::
type FetchListType = ({ current, pageSize }?: { current?: number; pageSize?: number }) => void
const fetchList: FetchListType = ({ current = 1, pageSize = 10 } = {}) => {/*...*/}

If I fix this problem, I should trans the function type declaration like this, make the object parameter not optional
type FetchListType = ({ current, pageSize }: { current?: number; pageSize?: number }) => void
This result I should invoke fetchList with empty object:
fetchList({}) // should have a parameter
The question is: How to declare the function type that can make me invoke the function without parameter?