SigilJS – Runtime Types for JavaScript

(github.com)

1 points | by antistructured 10 hours ago ago

1 comments

  • antistructured 10 hours ago

    JavaScript has great compile-time types (TypeScript), but at runtime, those types disappear.

    SigilJS is a tiny library that lets you describe data using type sigils and validate it at runtime.

    Example:

    const User = Sigil` { name: string age?: number } `

    User.check(data)

    Zero dependencies. Bun-first.

    Would love feedback.