how to mention the type of destructured variable in typescript code example
Example: destruct type definition typescript
interface User {
name: string;
age: number;
}
const obj: any = { name: 'Johnny', age: 25 };
const { name, age }: User = obj;