Answers for "typescript for loop convert type to any"

1

typescript loop types

export const markets = ['au', 'br', 'de'] as const;
export type Market = typeof markets[number];

markets.forEach((market: Market) => {
    console.log(market);
});
Posted by: Guest on August-20-2021

Code answers related to "typescript for loop convert type to any"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language