to understand what a particular syntax mean
https://dontasktoask.com
export const NETWORK_LABELS: { [chainId in SupportedChainId | number]: string } = { [SupportedChainId.MAINNET]: 'Mainnet', [SupportedChainId.RINKEBY]: 'Rinkeby', [SupportedChainId.ROPSTEN]: 'Ropsten', [SupportedChainId.GOERLI]: 'Görli', [SupportedChainId.KOVAN]: 'Kovan', [SupportedChainId.ARBITRUM_ONE]: 'Arbitrum One', } What does the type of NETWORK_LABELS here mean? Specifically { [chainId in SupportedChainId | number]: string }
Обсуждают сегодня