react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

Stack overflow with cast generic

Open jquense opened this issue 5 years ago • 0 comments

export const toArray = <T>(arr?: any) =>
  ([] as T[]).concat(arr);

Will break. It's due to the as T[], maybe a similar issue as #410 ?

jquense avatar Feb 26 '20 20:02 jquense