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.
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
6 Replies
im taking a look rn
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
got to a solution im decently happy with
hopefully it makes sense to you
made it much better
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
its beautiful
im actually quite proud that was pretty fun
Wow that is a nice solution
its a fun challenge
shame that i don't even really need this bc I just discovered that my database ORM can do this me 🤦♂️
cool learning expereince for me though