/** * Converts an MQTT topic filter into a regular expression according to the MQTT specification. * * This utility escapes standard regex characters to prevent injection or unexpected behavior, * and then converts the native MQTT wildcards into their regex equivalents: * - `+` (single-level wildcard) becomes `[^/]+` (matches one or more characters except a forward slash) * - `#` (multi-level wildcard) becomes an optional matching group `(?:/.*)?` to correctly handle parent levels. * * @param topicFilter - The MQTT topic filter string to convert (e.g., "home/+/temperature" or "clients/#"). * @returns A `RegExp` object configured to match topics corresponding to the filter. * * @example * ```typescript * const regex = topicFilterToRegExp("home/+/temperature"); * regex.test("home/livingroom/temperature"); // true * regex.test("home/kitchen/lights"); // false * ``` */ export declare function topicFilterToRegExp(topicFilter: string): RegExp; /** * Parses a Topic filter for a "shared subscription" into the share name and the regular Topic Filter * * @param topicFilter - The MQTT topic filter string to parse (e.g. "$share/sharename/rest/of/topic/filter")). * @returns an object that contains the regular topicFilter and he share name (if present) */ export declare function parseTopicFilter(topicFilter: string): { topicFilter: string; shareName: string; }; /** the inverse of parseTopicFilter */ export declare function joinTopicFilter(topicFilter: string, shareName: string): string; //# sourceMappingURL=topicFilter.d.ts.map