Answers for "types for parameter destructuring"

0

types for parameter destructuring

// How to you apply types to destructured parameters?
function args({ a, b }){
  ...
}

// TypeScript: types for parameter destructuring
function args({ a, b }:{ a: string, b: boolean }){
  ...
}

args({ a: "a", b: false });
Posted by: Guest on March-15-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language