glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
12.12k stars 1.06k forks source link

Suggestion: Allow choosing whether to export types #2427

Closed moselhy closed 3 months ago

moselhy commented 10 months ago

Sometimes I don't need to export all the types that are generated. Instead of having to find/replace export each time I use the tool, it would be nice if there was a toggle among the existing ones to choose whether or not I would like to export the generated types.

inferrinizzard commented 3 months ago

I would recommend re-exporting the specific types that you need with another file: ie.

/** quicktypeOutput.ts */

export interface Foo {
  a: number;
}

export interface Bar {
  b: string;
}
/** index.ts */
export { Foo } from './quicktypeOutput';