return [[x, y], d, prevRing, prevRingPosition]
That is my return statement and I want to make a type for its function
type nextUlamReturn = [
number[],
d: number,
prevRing: number,
prevRingPosition: number
]
But this gives me the error:
Err: Tuple members must all have names or all not have names.
I've searched a lot in the internet but I couldn't find a solution.
You need an array? You can return an object with named properties like: