/** * $extends Inheritance Utilities for JSON Structure * * Handles resolution of $extends inheritance within JSON Structure schemas. */ import type { JSONStructureSchema, TypeDefinition } from './structure-types'; import { RefResolver } from './ref-utils'; /** * Result of resolving inheritance */ export interface InheritanceResult { /** The merged type definition with all inherited properties */ merged: TypeDefinition; /** Chain of base types (from most base to most derived) */ inheritanceChain: string[]; /** Any errors encountered during resolution */ errors: InheritanceError[]; } export interface InheritanceError { path: string; message: string; } /** * Resolve $extends for a type definition * * Properties are merged with derived type taking precedence over base types. * For multiple inheritance, types are processed left-to-right with later * types taking precedence. */ export declare function resolveExtends(definition: TypeDefinition, schema: JSONStructureSchema, _refResolver?: RefResolver): InheritanceResult; /** * Create an extends resolver for a schema (convenience function) */ export declare function createExtendsResolver(schema: JSONStructureSchema): { resolve: (definition: TypeDefinition) => InheritanceResult; };