import { GlobOptions } from "tinyglobby";
export type D2Options = {
    layout?: "dagre" | "elk";
    sketch?: boolean;
    themeID?: number;
    graphFormat?: "graphology" | "dagre";
    shared?: string | string[] | GlobOptions;
};
export declare function d2(code: string, options: D2Options): Promise<{
    svg: string;
    data: {
        options: {
            directed: boolean;
            multigraph: boolean;
            compound: boolean;
            allowSelfLoops?: undefined;
            multi?: undefined;
            type?: undefined;
        };
        nodes: {
            v: any;
        }[];
        edges: {
            v: any;
            w: any;
            name: any;
        }[];
        attributes?: undefined;
    } | {
        attributes: {
            name: string;
        };
        options: {
            allowSelfLoops: boolean;
            multi: boolean;
            type: string;
            directed?: undefined;
            multigraph?: undefined;
            compound?: undefined;
        };
        nodes: {
            key: any;
        }[];
        edges: {
            key: any;
            source: any;
            target: any;
        }[];
    } | undefined;
}>;
