import { JSONSchema7 } from 'json-schema'; type IfDefined = unknown extends TValue ? TModule extends '' ? never : `Cannot find module '${TModule}'` : TValue; type UnknownIfNever = [T] extends [never] ? unknown : T; declare function memoize(fn: () => Promise): (() => Promise) & { clear(): void; }; declare function memoizeWithKey(fn: (key: TKey) => Promise): ((key: TKey) => Promise) & { clear(): void; }; declare function unsupportedAdapter(adapterName: string): (schema: SchemaFrom) => Promise; interface Resolver { schema: TSchema; input: unknown; output: unknown; base: unknown; } type SchemaFrom = IfDefined; type InputFrom = TSchema extends SchemaFrom ? IfDefined<(TResolver & { schema: TSchema; })['input']> : never; type OutputFrom = TSchema extends SchemaFrom ? IfDefined<(TResolver & { schema: TSchema; })['output']> : never; type SerializationAdapter = >(schema: TSchema) => Promise; type ToJSONSchema = >(schema: TSchema) => Promise; declare function createToJSONSchema(serializationAdapter: SerializationAdapter): ToJSONSchema; type ValidationIssue = { message: string; path?: Array; }; type ValidationResult = { success: true; data: TOutput; } | { success: false; issues: Array; }; type ValidationAdapter = >(schema: TSchema) => Promise<(data: unknown) => Promise>>>>; type Validate = >(schema: TSchema, data: unknown) => Promise>>>; declare function createValidate(validationAdapter: ValidationAdapter): Validate; type Assert = >(schema: TSchema, data: unknown) => Promise>>; declare function createAssert(validate: Validate): Assert; type TypeSchema = { _input: TInput; _output: TOutput; assert(data: unknown): Promise; parse(data: unknown): Promise; validate(data: unknown): Promise<{ data: TOutput; } | { issues: Array; }>; }; type Wrap = >(schema: TSchema) => TypeSchema>, UnknownIfNever>>; declare function createWrap(assert: Assert, validate: Validate): Wrap; export { type Assert, type IfDefined, type InputFrom, type OutputFrom, type Resolver, type SchemaFrom, type SerializationAdapter, type ToJSONSchema, type TypeSchema, type UnknownIfNever, type Validate, type ValidationAdapter, type ValidationIssue, type ValidationResult, type Wrap, createAssert, createToJSONSchema, createValidate, createWrap, memoize, memoizeWithKey, unsupportedAdapter };