Skip to content

[FEATURE]: Typed renderer options #2772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ladvoc opened this issue May 29, 2025 · 0 comments
Open

[FEATURE]: Typed renderer options #2772

ladvoc opened this issue May 29, 2025 · 0 comments

Comments

@ladvoc
Copy link

ladvoc commented May 29, 2025

I am using QuickType programmatically in a script to generate bindings for multiple languages, and I would like to be able to specify type-safe renderer options for each language. For example:

const rendererOptions = {
  "python-version": "3.6",
  "nice-property-names": true
} satisfies RendererOptions<"python">;

const res = await quicktype({
  inputData,
  lang: "python",
  rendererOptions
});

The above example currently results in a type error:

Type 'boolean' is not assignable to type 'BooleanOption<"nice-property-names">'.ts(2322)

Is it currently possible to get the "raw" TypeScript type corresponding to the renderer options for a specific language?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant