Define once in Elixir. Generate everywhere in TypeScript.
Typelizer gives a Phoenix app:
Typelizer.Serializer- a serializer DSL that serializes records at runtime and is the source of a TypeScript interface. Types are inferred from Ecto schemas;Ecto.Enumfields become literal unions.- Typed route helpers generated from the Phoenix router, with URL defaults and
typed query params (
Typelizer.Query). Typelizer.InertiaPage- typed page props for Inertia.js pages, checked at runtime in dev and test byTypelizer.InertiaPage.ValidateProps.mix typelizer.gento write the TypeScript files andmix typelizer.checkto fail when they are out of date.
Start with the Getting started guide.