Object destructuring in TypeScript