Typed function parameters using destructuring and rest in TypeScript
To add type declarations to destructured parameters you need to declare the type of the containing object. From the typescript documentation: … Confusingly, the colon here does not indicate the type. The type, if you specify it, still needs to be written after the entire destructuring… let { a, b }: { a: string, b: … Read more