Learn how to type lists in TypeScript: arrays, tuples and enums, plus the typed array methods and the as const alternative. We read every line of code, ...
YouTubePingToPrompt
2026/10/15 -Give a TypeScript enum multiple values per member with a Record lookup, an as const object or a class-based enum, or combine members with bit flags.
Thanks for watching. Any thoughts? Write a comment. If you liked the video, Like and Subscribe. It helps to create more videos!
YouTubeTutsKGR Dev
2026/9/24 -TypeScriptのenumを実行できるサンプルで解説。数値・文字列・const enum、逆マッピング、ループ、値のチェック、enum とユニオン型と as const の比較。
2026/10/10 -Enums work, but they have some quirks. Unlike most TypeScript features, an enum isn't just a type: it generates real JavaScript code at runtime. Numeric enums ( ...
2026/10/9 -Why TypeScript enums cause problems, and how string literal unions and as const arrays give you the same type safety with zero runtime cost.
2026/9/10 -There are two JavaScript array methods that are commonly used to find a value in an array: includes() and indexOf() . If you are checking if an array contains a ...
2026/8/26 -Once a value has a union type, TypeScript won't let you use type-specific behavior until you prove which branch you're in. This is called narrowing , and it's ...
2026/9/28 -TypeScript enums compile into extra JS objects and numeric enums allow assigning arbitrary numbers, undermining type safety. Using `as const` instead ...
3日前 -TypeScript-only syntax includes interfaces, enum , namespace , as , ! ... typescript/prefer-includes : Prefer array.includes(x) over array.indexOf(x) ...