IceAge2OnDVD
Explore posts from serversTTCTheo's Typesafe Cult
•Created by IceAge2OnDVD on 6/12/2023 in #questions
Whats going on with these type errors? (Challenge, TSPlayground Included)
No mater how hard I try I can't seem to fix these Typescript errors. Tbh I'm not much of a typescript wizard and I've mostly been guessing at the types, any pointers in the right direction would be greatly appreciated. I seem to fix one error and three more pop up 🤦♂️
Playground (Test-cases & example included):
https://tsplay.dev/Wzxn2N
The aim of the function is to turn an array of objects with a sibling relationship to one with a parent-child relationship. The example input & output in the TSPlayground should make it clearer.
Currently the function works, its just the types are strange.
13 replies