SafeScript runtime tool that add checks for JavaScript and TypeScript

This page summarizes the projects mentioned and recommended in the original post on /r/programming

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SafeScript

    This package intent is to make "safe" JavaScript runtime by checking types at runtime and disallowing most of implicit coercion

  • ts-runtime

    Runtime Type Checks for TypeScript

  • There is also https://github.com/fabiandev/ts-runtime for Typescript that looks more polished. Too bad both these projects were abandoned, it would be such a cleaner alternative to libraries like io-ts.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • zod

    TypeScript-first schema validation with static type inference

  • Use unknown for data originating from an external source and use a library like zod to parse it. That has the added benefit that you immediately get an error in case the data is invalid vs. some time later when you're trying to do an operation on invalid data.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts