UNPKG

@adguard/agtree

Version:
28 lines (27 loc) 1.15 kB
import { type ConfigCommentRule } from '../../nodes/index.js'; import { BaseDeserializer } from '../base-deserializer.js'; import { type InputByteBuffer } from '../../utils/input-byte-buffer.js'; /** * `ConfigCommentDeserializer` is responsible for deserializing inline AGLint configuration rules. * Generally, the idea is inspired by ESLint inline configuration comments. * * @see {@link https://eslint.org/docs/latest/user-guide/configuring/rules#using-configuration-comments} */ export declare class ConfigCommentDeserializer extends BaseDeserializer { /** * Deserializes a metadata comment node from binary format. * * @param buffer ByteBuffer for reading binary data. * @param node Destination node. * @throws If the binary data is malformed. */ private static deserializeConfigNode; /** * Deserializes a metadata 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<ConfigCommentRule>): void; }