I recently joined a team that uses Elixir, React, and TypeScript. I’m focused on the frontend bit, but there’s a mismatch between the TypeScript definitions and the API response types.
Are there ways to generate TypeScript interfaces in Elixir so we can maintain a single source of truth?
For example, In GraphQL, I’m used to using Relay, apollo codegen, and graphql-codegen to generate proper TypeScript interfaces from the GraphQL endpoint.
This library, openapi-typescript, also allows you to generate Typescript Interfaces in NodeJS.
I will appreciate help on how people handle this issue or possible solutions. Thanks!