Re:TypeScript: Branded Types
by nsonha on Wednesday April 24, 2024 @09:29PM
(#40152231)
I know what SOLID is, questioning how exactly you think Flow has
"liskov substitution" as a feature.
[ Parent
| on HN ]
Re:TypeScript: Branded Types
by mirekrusin on Thursday April 25, 2024 @12:59AM
(#40153595)
L in SOLID refers to Liskov substitution principles.
It's the only one from the SOLID list which can be typechecked - others are design principles.
"Flow adhering to it" means that violating code will be flagged by type system.
It matters because unlike other principles, violations can cause runtime errors.