/** * @file Conversion result interface and helper functions. */ import { type Node } from '../../nodes/index.js'; /** * Common conversion result interface. * * @template T Type of the item to convert. * @template U Type of the conversion result (defaults to `T`, but can be `T[]` as well). */ export interface ConversionResult { /** * Conversion result. */ result: U; /** * Indicates whether the input item was converted. */ isConverted: boolean; } /** * Adblock rule node conversion result interface, where the conversion result is an array of rules. */ export type NodeConversionResult = ConversionResult; /** * Helper function to create a generic conversion result. * * @template T Type of the item to convert. * @template U Type of the conversion result (defaults to `T`, but can be `T[]` as well). * * @param result Conversion result. * @param isConverted Indicates whether the input item was converted. * * @returns Generic conversion result. */ export declare function createConversionResult(result: U, isConverted: boolean): ConversionResult; /** * Helper function to create a node conversion result. * * @template T Type of the node (extends `Node`). * * @param nodes Array of nodes. * @param isConverted Indicates whether the input item was converted. * * @returns Node conversion result. */ export declare function createNodeConversionResult(nodes: T[], isConverted: boolean): NodeConversionResult;