📅  最后修改于: 2022-03-11 14:48:25.033000             🧑  作者: Mango
// The closest thing to a named return is
// defining a type and using it immediately
type Total = number
type Product = number
function stats(vals: number[]): [Total, Product] {
...
}