DEV Community

Discussion on: 5 TypeScript features that will improve your codebase

Collapse
 
glebirovich profile image
Gleb Irovich

Good catch regarding the load, I will update the example.
You are also right, that we can use it inline, but the idea was also to discuss the type guards. If this check is extracted it can be reused across the app if necessary and it also improves readability of the code.