Since v2, json-schema-to-ts now supports an option as secondary input. For the moment, TypeBridge doesn't give the possibility to hydrate such options. I see two possibilities to fix that:
Give the possibility to hydrate such options with generic types
const myEvent = new Event<"EVENT_NAME", typeof mySchema, FromSchemaOptions>({...})
Give the possibility to override the inferred type with an overlay
type MyOverlay = {
name: string
}
const myEvent = new Event<MyOverlay, "EVENT_NAME">({...}) // <= Is hard-typing the event name really useful ?
// This way the users can re-use FromSchema with custom options in the Overlay
const myEvent = new Event<FromSchema<typeof mySchema, CustomOptions>, "EVENT_NAME">({...})
Hi @fredericbarthelet 👋
Since v2, json-schema-to-ts now supports an option as secondary input. For the moment, TypeBridge doesn't give the possibility to hydrate such options. I see two possibilities to fix that:
WDYT ?