import { type Dereference } from '@scalar/workspace-store/helpers/get-resolved-ref'; type RefNode = Partial & { $ref: string; '$ref-value': Node | RefNode; }; type NodeInput = Node | RefNode; /** * Recursively resolves $ref objects * This type helper ensures proper typing for deeply nested ref resolution. * Properties that could contain $ref objects may resolve to '[circular]' if we have a circular reference. */ type DeepDereference = Dereference extends T ? T extends readonly (infer U)[] ? DeepDereference[] : T extends object ? { [K in keyof T]: T[K] extends RefNode ? DeepDereference | '[circular]' : DeepDereference; } : T : Dereference extends object ? { [K in keyof Dereference]: Dereference[K] extends RefNode ? DeepDereference[K]> | '[circular]' : DeepDereference[K]>; } : Dereference; /** * Recursively resolves all $ref objects in a data structure to their actual values. * Traverses through objects, arrays, and nested structures to find and resolve * any $ref references at any depth level. * * Handles circular references gracefully by detecting them and returning '[circular]' * to prevent infinite loops. */ export declare const getResolvedRefDeep: (node: NodeInput) => DeepDereference>; export {}; //# sourceMappingURL=get-resolved-ref-deep.d.ts.map