TypeScript: String Literals

preview_player
Показать описание
String literal types allow you to specify the exact value a string must have. In practice string literal types combine nicely with union types, type guards, and type aliases. You can use these features together to get enum-like behavior with strings.

Рекомендации по теме
Комментарии
Автор

Hey, that was a really nice tutorial, subscribed!

As a side note (hope you don't mind), please consider changing your microphone to a headset mounted one or something because your narration is about as loud as the keystrokes in the background, if I turn the volume up to hear you, it's like jungle drums, quite jarring. :)

Thanks!

dkarlovi