Abstract Data Types in TypeScript