Answers for "typescript object destructuring"

3

typescript object destructuring

// declare an interface or a type
interface Person {
  name: string;
  age: string;
}

// destructure name and age from `obj` variable.
const { name, age }: Person = obj;
Posted by: Guest on December-03-2020
0

array destructuring typescript type

function f([a,b,c]: [number, number, number]) {

}
Posted by: Guest on April-25-2021
0

typescript object destructuring

let { a, b }: { a: string; b: number } = o;
Posted by: Guest on October-14-2021

Code answers related to "typescript object destructuring"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language