I am trying to convert a string array to a number array A quick google search have lead me to this solution.
let numbersAsStringArray = originalQueryParams[property] ?? []
let numbers = numbersAsStringArray.map((i) => Number(i));
where I keep getting this i
Property 'map' does not exist on type 'string | string[]'.
numbersAsStringArray is just an simple array with a number in as a string.
originalQueryParams[property]is not an array or at least typescript is not sure about it. You need to cast if you are sure it is an array or use a type guard.