type StatusWithBrackets = { [K in Status]: `[${K}]` }[Status];
💡 Что здесь происходит?
1️⃣ **[K in Status]: \[${K}]`** Мы создаем объект на уровне типов. Для каждого значения из Status ('success' | 'error' | 'loading'`) генерируются ключи и их значения. Например:
type StatusWithBrackets = { [K in Status]: `[${K}]` }[Status];
💡 Что здесь происходит?
1️⃣ **[K in Status]: \[${K}]`** Мы создаем объект на уровне типов. Для каждого значения из Status ('success' | 'error' | 'loading'`) генерируются ключи и их значения. Например:
Two days after Russia invaded Ukraine, an account on the Telegram messaging platform posing as President Volodymyr Zelenskiy urged his armed forces to surrender. But because group chats and the channel features are not end-to-end encrypted, Galperin said user privacy is potentially under threat. During the operations, Sebi officials seized various records and documents, including 34 mobile phones, six laptops, four desktops, four tablets, two hard drive disks and one pen drive from the custody of these persons. Andrey, a Russian entrepreneur living in Brazil who, fearing retaliation, asked that NPR not use his last name, said Telegram has become one of the few places Russians can access independent news about the war. "Someone posing as a Ukrainian citizen just joins the chat and starts spreading misinformation, or gathers data, like the location of shelters," Tsekhanovska said, noting how false messages have urged Ukrainians to turn off their phones at a specific time of night, citing cybersafety.
from ru