Skip to content
AgileLogics
3 min read

Security

TypeScript's type system does not provide any security guarantees at runtime — a type assertion (as SomeType) or an untyped third-party import can silently bypass every check.

All of JavaScript's usual security practices still fully apply: never insert untrusted text via innerHTML, validate external data at runtime (not just its assumed compile-time type), and never trust a type assertion as if it were a runtime guarantee.