Answer the question
In order to leave comments, you need to log in
How to set the type for an array of objects?
interface types {
???
}
let arr = [
{ id: 1, quantity: 1 }
]
function fun(someArray:types ) {}
fun(arr )
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question