📅  最后修改于: 2022-03-11 15:00:38.748000             🧑  作者: Mango
// Only works for literal arrays
const someArr = ["a", "b", "c"] as const
type UnionOfSomeArrValue = typeof someArr[number] // => "a" | "b" | "c"