Answers for "property 'length' does not exist on type 'T'"

0

property 'length' does not exist on type 'T'

const result = <T extends any>(arr:T[]):T => {
  return arr[arr.length - 1] 
}

result([1,2,3])
Posted by: Guest on September-24-2020

Code answers related to "property 'length' does not exist on type 'T'"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language