TypeScript : Internal information leak