findAll(options: Partial<{
from: number
to: number
n: number
s: number
}> = {}
)
get(from?: number, to?: number, n = 1, s = -1) {
findAll({ from, to, n, s }))
// Type 'number | undefined' is not assignable to type 'number'.
// Type 'undefined' is not assignable to type 'number'
}
If I change findAll option to number | undefined it messes my function typings and it's ugly.
And if I don't I get an error when I put undefined on an optional property...
Is there a clean way to fix this ?