@adguard/agtree
Version:
Tool set for working with adblock filter lists
25 lines (24 loc) • 955 B
TypeScript
import { type OutputByteBuffer } from '../../utils/output-byte-buffer.js';
import { type CommentRule } from '../../nodes/index.js';
import { BaseSerializer } from '../base-serializer.js';
/**
* `SimpleCommentSerializer` is responsible for serializing simple comments.
* Some comments have a special meaning in adblock syntax, like agent comments or hints,
* but this serializer is only responsible for serializing regular comments,
* whose only purpose is to provide some human-readable information.
*
* @example
* ```adblock
* ! This is a simple comment
* # This is a simple comment, but in host-like syntax
* ```
*/
export declare class SimpleCommentSerializer extends BaseSerializer {
/**
* Serializes a simple comment rule node to binary format.
*
* @param node Node to serialize.
* @param buffer ByteBuffer for writing binary data.
*/
static serialize(node: CommentRule, buffer: OutputByteBuffer): void;
}