I have this item:
const five: { quantity: number } = {
quantity: 5,
}
I would like to transform it into a function that yields the same item, like this:
const five = () => ({quantity: 5})
Is there a way for me to reuse the casting to ensure the response type stays consistent?