In TypeScript classes it\'s possible to declare types for properties, for example:
class className { property: string; };
How do declare
If you're trying to add typings to a destructured object literal, for example in arguments to a function, the syntax is:
function foo({ bar, baz }: { bar: boolean, baz: string }) { // ... } foo({ bar: true, baz: 'lorem ipsum' });