📜  打字稿代码示例中的循环类型

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

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

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