Graph data structures in TypeScript