import type { ErrorObject } from 'ajv'; import type { StandardSchemaV1 } from '../errors/event-error/standard-schema.js'; interface ThereforeSchema { is: (o: unknown) => o is T; errors?: ErrorObject[] | null | undefined; } export type GenericParser = StandardSchemaV1 | ThereforeSchema; export type MaybeGenericParser = GenericParser | undefined; export type InferFromParser = [T] extends [undefined] ? Default : T extends StandardSchemaV1 ? StandardSchemaV1.InferOutput : T extends ThereforeSchema ? U : Default; export {};