TypeScript: cleanup