# Typelizer v0.2.0 - Table of Contents

> Define once in Elixir. Generate everywhere in TypeScript: serializers, Phoenix route helpers and Inertia page props.

## Pages

- [Typelizer](readme.md)
- [Changelog](changelog.md)

- Guides
  - [Getting started](getting-started.md)
  - [Serializers](serializers.md)
  - [Route helpers](routes.md)
  - [Inertia page props](inertia.md)
  - [Configuration](configuration.md)

## Modules

- [Typelizer](Typelizer.md): Define once in Elixir. Generate everywhere in TypeScript.

- DSL
  - [Typelizer.InertiaPage](Typelizer.InertiaPage.md): Declares the props of Inertia pages. `mix typelizer.gen` writes one TypeScript props
interface per page component, and `Typelizer.InertiaPage.ValidateProps` checks the
rendered props in dev and test.
  - [Typelizer.Query](Typelizer.Query.md): Declares the query params of controller actions, so that the generated route
helpers type their `query` option.
  - [Typelizer.Serializer](Typelizer.Serializer.md): A serializer DSL that is also the source of a TypeScript interface.

- Runtime
  - [Typelizer.Envelope](Typelizer.Envelope.md): Wraps JSON-ready data in an envelope: `%{"data" => ..., "meta" => ...}`.
  - [Typelizer.InertiaPage.ValidateProps](Typelizer.InertiaPage.ValidateProps.md): A plug that checks, in dev and test, that each rendered Inertia page sends exactly
the props declared with `Typelizer.InertiaPage.page/2`.

- Errors
  - [Typelizer.InertiaPage.PropsError](Typelizer.InertiaPage.PropsError.md): Raised by `Typelizer.InertiaPage.ValidateProps` when the props of a rendered Inertia
page do not match the page declaration.

  - [Typelizer.SerializationError](Typelizer.SerializationError.md): Raised by `serialize/2` when a record cannot be serialized, for example when an
association is not preloaded or a field is missing from the record.

## Mix Tasks

- [mix typelizer.check](Mix.Tasks.Typelizer.Check.md): Checks that the generated TypeScript files match the Elixir code.
- [mix typelizer.gen](Mix.Tasks.Typelizer.Gen.md): Generates the TypeScript files: serializer interfaces, route helpers and Inertia page
props.

