Tree of objects in Javascript (TypeScript + jQuery + QUnit for testing + BootStrap)