I recently created a function to duplicate an array:
const data = (items) => {
myData = items.slice()
}
The variable items
is an array of objects with varying shapes. How can I accomplish this in TypeScript?
const data = (items: Array<any>) => {
This method works, but I'm uncertain if using 'any' is the most appropriate approach.