import { Plugin } from 'vite';
export interface ResolveIdOptions {
    /**
     * @example
     * {
     *  'DEFAULT': {
     *    'src': 'src',
     *   },
     *  'apps/web': {
     *    '#utils': 'src/utils',
     *   }
     * }
     */
    alias?: Record<string, Record<string, string>>;
    root?: string;
    separator?: string;
    workspacePaths?: (string | RegExp)[];
}
export declare const trimLastSlash: (path: string, replacer: string) => string;
export declare const trimFirstSlash: (path: string, replacer: string) => string;
export declare const getWorkspaceRegexString: (workspacePath: string) => RegExp;
export declare const getWorkspaceRegex: (workspacePath: string | RegExp) => RegExp;
export declare const getWorkspaceRegexList: (workspacePaths: (string | RegExp)[]) => RegExp[];
export interface MatchWorkspaceResult {
    relativePath: string;
    relativeWorkspaceRoot: string;
    root: string;
    workspaceRoot: string;
}
export declare const matchWorkspace: (root: string, workspacePaths: RegExp[], path: string) => MatchWorkspaceResult | undefined;
export declare const getAliasId: (source: string, alias?: [RegExp, string][]) => string;
export declare const normalizeAliasKey: (path: string) => RegExp;
export declare const normalizeAlias: (alias: Record<string, string>) => [RegExp, string][];
export declare const normalizeAliasTreeKey: (key: string) => string;
export declare const normalizeAliasTree: (alias: Record<string, Record<string, string>>) => {
    [k: string]: [RegExp, string][];
};
export declare const createAlias: (options: ResolveIdOptions) => Plugin;
export declare const monorepoAlias: (options: ResolveIdOptions) => Plugin;
