type LineNumber = number;
type ColumnNumber = number;
type MultiLineRange = {
    fromLineNumber: LineNumber;
    toLineNumber: LineNumber;
};
type InlineRange = {
    lineNumber: LineNumber;
    fromColumn: ColumnNumber;
    toColumn: ColumnNumber;
};
type CodeRange = MultiLineRange | InlineRange;

type Annotation = {
    name: string;
    query?: string;
    ranges: CodeRange[];
};
type AnnotationData = {
    name: string;
    rangeString: string;
    query?: string;
};
type AnnotationExtractor = string[] | ((comment: string) => null | AnnotationData);

type Token = {
    content: string;
    style: {
        color?: string;
        fontStyle?: "italic";
        fontWeight?: "bold";
        textDecoration?: "underline" | "line-through";
    };
    scopes?: string[];
};
type TokenGroup = {
    annotationName: string;
    annotationQuery?: string;
    fromColumn: number;
    toColumn: number;
    tokens: Tokens;
};
type Tokens = (Token | TokenGroup)[];
type Line = {
    lineNumber: number;
    tokens: Tokens;
};
type LineGroup = {
    annotationName: string;
    annotationQuery?: string;
    fromLineNumber: number;
    toLineNumber: number;
    lines: Lines;
};
type Lines = (Line | LineGroup)[];

declare const LANG_NAMES: string[];
type NamesTuple$1 = typeof LANG_NAMES;
type LanguageAlias = NamesTuple$1[number];
type LanguageName = "angular-html" | "angular-ts" | "apache" | "applescript" | "asm" | "astro" | "awk" | "bat" | "c" | "clarity" | "clojure" | "cmake" | "codeowners" | "coffee" | "common-lisp" | "cpp" | "csharp" | "css" | "csv" | "diff" | "docker" | "dotenv" | "elixir" | "elm" | "emacs-lisp" | "erb" | "erlang" | "fish" | "fsharp" | "git-commit" | "git-rebase" | "gleam" | "glimmer-js" | "glimmer-ts" | "gnuplot" | "go" | "graphql" | "groovy" | "hack" | "haml" | "handlebars" | "haskell" | "html" | "html-derivative" | "http" | "ini" | "java" | "javascript" | "jinja" | "jison" | "json" | "json5" | "jsonc" | "jsonl" | "jsx" | "julia" | "kotlin" | "latex" | "less" | "liquid" | "log" | "logo" | "lua" | "luau" | "make" | "markdown" | "mdx" | "nginx" | "objective-c" | "objective-cpp" | "ocaml" | "perl" | "php" | "postcss" | "prisma" | "prolog" | "proto" | "puppet" | "python" | "r" | "racket" | "regexp" | "ruby" | "rust" | "sass" | "scala" | "scheme" | "scss" | "shellscript" | "smalltalk" | "solidity" | "sparql" | "splunk" | "sql" | "stylus" | "svelte" | "swift" | "systemd" | "tcl" | "toml" | "tsx" | "txt" | "typescript" | "typespec" | "vue" | "vue-html" | "wasm" | "xml" | "yaml" | "zig";

type RawTheme = {
    name?: string;
    type?: string;
    tokenColors?: ThemeSetting[];
    colors?: {
        [key: string]: string;
    };
    [key: string]: any;
};
type ThemeSetting = {
    name?: string;
    scope?: string | string[];
    settings: {
        fontStyle?: string;
        foreground?: string;
        background?: string;
    };
};
declare const THEME_NAMES: readonly ["base16"];
type NamesTuple = typeof THEME_NAMES;
type StringTheme = NamesTuple[number];
type Theme = StringTheme | RawTheme;
declare class UnknownThemeError extends Error {
    theme: string;
    constructor(theme: string);
}

declare class UnknownLanguageError extends Error {
    alias: string;
    constructor(alias: string);
}

type Config = {
    scopes?: boolean;
};
type AnnotatedConfig = {
    annotations: Annotation[];
} & Config;
type LighterResult = {
    lines: Token[][];
    lang: LanguageName;
    style: {
        color: string;
        background: string;
    };
};
type AnnotatedLighterResult = {
    lines: Lines;
    lang: LanguageName;
    style: {
        color: string;
        background: string;
    };
};

declare function preload(langs: LanguageAlias[], theme?: Theme): Promise<void>;
declare function highlight(code: string, lang: LanguageAlias, themeOrThemeName?: Theme, config?: Config): Promise<LighterResult>;
declare function highlight(code: string, lang: LanguageAlias, themeOrThemeName: Theme, config: AnnotatedConfig): Promise<AnnotatedLighterResult>;
declare function highlightSync(code: string, lang: LanguageAlias, themeOrThemeName?: Theme, config?: Config): LighterResult;
declare function highlightSync(code: string, lang: LanguageAlias, themeOrThemeName: Theme, config: AnnotatedConfig): AnnotatedLighterResult;
declare function extractAnnotations(code: string, lang: LanguageAlias, annotationExtractor?: AnnotationExtractor): Promise<{
    code: string;
    annotations: {
        ranges: CodeRange[];
        name: string;
        query?: string;
    }[];
}>;
declare function getThemeColors(themeOrThemeName: Theme): Promise<{
    colorScheme: string;
    foreground: string;
    background: string;
    lighter: {
        inlineBackground: string;
    };
    editor: {
        background: string;
        foreground: string;
        lineHighlightBackground: string;
        rangeHighlightBackground: string;
        infoForeground: string;
        selectionBackground: string;
    };
    focusBorder: string;
    tab: {
        activeBackground: string;
        activeForeground: string;
        inactiveBackground: string;
        inactiveForeground: string;
        border: string;
        activeBorder: string;
        activeBorderTop: string;
    };
    editorGroup: {
        border: string;
    };
    editorGroupHeader: {
        tabsBackground: string;
    };
    editorLineNumber: {
        foreground: string;
    };
    input: {
        background: string;
        foreground: string;
        border: string;
    };
    icon: {
        foreground: string;
    };
    sideBar: {
        background: string;
        foreground: string;
        border: string;
    };
    list: {
        activeSelectionBackground: string;
        activeSelectionForeground: string;
        hoverBackground: string;
        hoverForeground: string;
    };
}>;
declare function getThemeColorsSync(themeOrThemeName: Theme): {
    colorScheme: string;
    foreground: string;
    background: string;
    lighter: {
        inlineBackground: string;
    };
    editor: {
        background: string;
        foreground: string;
        lineHighlightBackground: string;
        rangeHighlightBackground: string;
        infoForeground: string;
        selectionBackground: string;
    };
    focusBorder: string;
    tab: {
        activeBackground: string;
        activeForeground: string;
        inactiveBackground: string;
        inactiveForeground: string;
        border: string;
        activeBorder: string;
        activeBorderTop: string;
    };
    editorGroup: {
        border: string;
    };
    editorGroupHeader: {
        tabsBackground: string;
    };
    editorLineNumber: {
        foreground: string;
    };
    input: {
        background: string;
        foreground: string;
        border: string;
    };
    icon: {
        foreground: string;
    };
    sideBar: {
        background: string;
        foreground: string;
        border: string;
    };
    list: {
        activeSelectionBackground: string;
        activeSelectionForeground: string;
        hoverBackground: string;
        hoverForeground: string;
    };
};
type LighterColors = ReturnType<typeof getThemeColors>;

export { AnnotatedLighterResult, Annotation, LANG_NAMES, LanguageAlias, LighterColors, LighterResult, Line, LineGroup, Lines, RawTheme, StringTheme, THEME_NAMES, Theme, Token, TokenGroup, Tokens, UnknownLanguageError, UnknownThemeError, extractAnnotations, getThemeColors, getThemeColorsSync, highlight, highlightSync, preload };
