Загрузка видео...

Не удалось загрузить видео

На главную

Problem: I want to ensure my switch statement handles all potential cases. Solution: Use TypeScript's never type. Here's how:

49,603 просмотров • 1 год назад •via X (Twitter)

Комментарии: 11

Фото профиля Cory House
Cory House1 год назад

Full course with code for 20% off:

Фото профиля Alexander Mia
Alexander Mia1 год назад

INTRODUCING: Agentic Security - LLM Security Scanner! 🔍 🔑 Features: Scans for prompt injections, jailbreaking & more. Provides detailed reports & options to customize attack rules. 🔗access the GitHub Link ↓

Фото профиля Pavel Svitek 🇨🇭
Pavel Svitek 🇨🇭1 год назад

Great tip.. this is a really good lib to handle these kind of issues

Фото профиля Cory House
Cory House1 год назад

Feel unnecessary to me, but I can see how one might prefer it

Фото профиля Artem Zakharchenko
Artem Zakharchenko1 год назад

This is awesome!

Фото профиля Wildan
Wildan1 год назад

nice use of never. learned a new thing!

Фото профиля ً
ً1 год назад

should just do `pet satisfies never`

Фото профиля tom byrer
tom byrer1 год назад

Or, if you have nested switch/if statements inside of your switch, use a Finite State Machine ;)

Фото профиля BDR
BDR1 год назад

Great tip thanks!

Фото профиля Benjamin Scott
Benjamin Scott1 год назад

Ah so that’s why “never” pops up every now and then To be honest, I’ve always hated seeing it but never understood it until recently

Фото профиля Niko E.
Niko E.1 год назад

A realy good one.

Похожие видео