import type { OpenAPIV3 } from "openapi-types"; import type { Context } from "./context.js"; export type HttpMethods = `${OpenAPIV3.HttpMethods}`; export type PrimitiveType = OpenAPIV3.NonArraySchemaObjectType; export type TypeValue = Function | PrimitiveType | [PrimitiveType | Function]; export type Thunk = (context: Context) => T; export type EnumTypeValue = string[] | number[] | Record; export type Logger = { warn: (typeof console)["warn"]; }; export type TypeOptions = { type?: Thunk | TypeValue; schema?: OpenAPIV3.SchemaObject; enum?: EnumTypeValue; }; export type TypeLoaderFn = ( context: Context, value: TypeValue, original?: Thunk | TypeValue, ) => Promise;