@adguard/agtree
Version:
Tool set for working with adblock filter lists
27 lines (26 loc) • 1.02 kB
TypeScript
import { type CommentRule } from '../../nodes/index.js';
import { BaseDeserializer } from '../base-deserializer.js';
import { type InputByteBuffer } from '../../utils/input-byte-buffer.js';
/**
* `SimpleCommentDeserializer` is responsible for deserializing simple comments.
*
* Some comments have a special meaning in adblock syntax, like agent comments or hints,
* but this parser is only responsible for parsing 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 SimpleCommentDeserializer extends BaseDeserializer {
/**
* Deserializes a simple comment node from binary format.
*
* @param buffer ByteBuffer for reading binary data.
* @param node Destination node.
* @throws If the binary data is malformed.
*/
static deserialize(buffer: InputByteBuffer, node: Partial<CommentRule>): void;
}