cctv

Type Safety and Runtime Safety Part.1/2: model, validator & data

TypeScript makes JavaScript even stronger with a strongly-typed system, which is a merit for developers. TypeScript checks our static code before running it. That is so called type safety. However, runtime safety is checking our code at runtime with real data. In runtime, TypeScript files are already compiled to JavaScript. So static type check is not available. It means: type safe does not mean runtime safe The post is divided into two parts....

Mar 17, 2024 Published · Oct 3, 2024 Updated · 5 min · Inori Inuyama