Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript loop types

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

markets.forEach((market: Market) => {
    console.log(market);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #loop #types
ADD COMMENT
Topic
Name
1+6 =