TypeScript Plugged In: Non-empty Array Types

preview_player
Показать описание

In order to create a Non-empty Array Type, we need to reach out to Variadic Tuples, a powerful mechanism which allows to dynamize the number of a tuple elements.

00:00 intro
00:20 expectations - tests
00:45 tuples - fails
01:04 satisfies keyword also fails
01:20 longer tuple - fails
01:40 variadic tuple
02:05 parametrize the variadic tuple
02:26 satisfies works correctly with variadic tuple

Рекомендации по теме