UNPKG

@adguard/agtree

Version:
18 lines (17 loc) 656 B
import { type AnyRule } from '../nodes/index.js'; import { type OutputByteBuffer } from '../utils/output-byte-buffer.js'; import { BaseSerializer } from './base-serializer.js'; /** * `RuleSerializer` is responsible for serializing the rules. * * It automatically determines the category and syntax of the rule, so you can pass any kind of rule to it. */ export declare class RuleSerializer extends BaseSerializer { /** * Serializes a rule node to binary format. * * @param node Node to serialize. * @param buffer ByteBuffer for writing binary data. */ static serialize(node: AnyRule, buffer: OutputByteBuffer): void; }