@builder.io/sdk-vue
Version:
Builder.io SDK for Vue
19 lines (18 loc) • 755 B
TypeScript
import type { BuilderBlock, BuilderContent } from '../server-index';
/**
* Recursively searches for a block by ID.
*
* @param content The Builder content to search through.
* @param id The ID of the block to search for.
* @returns The block if found, otherwise null.
*/
export declare const findBlockById: (content: BuilderContent, id: string) => BuilderBlock | null;
/**
* Helper function to recursively search through block tree.
*
* @param blocks The blocks to search through.
* @param id The ID of the block to search for.
* @returns The block if found, otherwise null.
* @private This is an internal implementation detail.
*/
export declare const findBlockInTree: (blocks: BuilderBlock[] | undefined, id: string) => BuilderBlock | null;