📜  typescript 循环类型 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:31.158000             🧑  作者: Mango

代码示例2
export const markets = ['au', 'br', 'de'] as const;
export type Market = typeof markets[number];

markets.forEach((market: Market) => {
    console.log(market);
});