Below is the typescript function I have created:
function foo({
a,
b,
c
}:{
a, //should this line be deleted?
b, //and this one too?
c:number
}){
//omitted code for brevity
}
This particular function implements Destructured Object Parameters. While it defines the type for c:number
, it leaves the types of a
and b
unspecified.
Therefore, my query is: can this function signature be written in a more concise manner by removing those lines and adopting a generic definition instead?