UNPKG

monogon

Version:

Modern syntax highlighting for developer tooling

19 lines (18 loc) 572 B
import type { DefinitionMap } from './types.ts'; /** * Calculates ranges to highlight based on regex * * @param {RegExp} search * @param {HTMLElement} element * * @return Range[] */ export declare const getRanges: (search: RegExp, element: HTMLElement) => Range[]; /** * Converts highlight definitions to usable module */ export declare const transformModule: (highlights: DefinitionMap, codeNode: HTMLElement, scope: string) => { apply: () => HighlightRegistry; css: string; }[]; export declare const monoLog: (message: string, error?: boolean) => void;