@adguard/agtree
Version:
Tool set for working with adblock filter lists
17 lines (16 loc) • 666 B
TypeScript
/**
* @file Utility functions for working with network rule nodes.
*/
import { type ModifierList, type NetworkRule } from '../nodes/index.js';
import { AdblockSyntax } from '../utils/adblockers.js';
/**
* Creates a network rule node.
*
* @param pattern Rule pattern.
* @param modifiers Rule modifiers (optional, default: undefined).
* @param exception Exception rule flag (optional, default: false).
* @param syntax Adblock syntax (optional, default: Common).
*
* @returns Network rule node.
*/
export declare function createNetworkRuleNode(pattern: string, modifiers?: ModifierList | undefined, exception?: boolean, syntax?: AdblockSyntax): NetworkRule;