unjs/untyped

Potential TS enhancement?

Opened this issue · 0 comments

Could we use a generic here-

export function defineUntypedSchema(options: SchemaDefinition) {

export function defineUntypedSchema<T extends SchemaDefinition>(options: T)

Otherwise I don't believe the return value to be strongly-typed; plus I may want to provide the generic explicitly and make sure that options corresponds to it (with appropriate $resolve functions, etc).