/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import type { CallArgumentSource, SourceRange } from '../internal-types';
export declare function maskJavaScriptSource(source: string): string;
export declare function maskJavaScriptComments(source: string): string;
export declare function maskTemplateLiteralComments(source: string, chars: string[], start: number): number;
export declare function maskTemplateLiteral(source: string, chars: string[], start: number): number;
export declare function findTemplateExpressionEnd(source: string, start: number): number;
export declare function skipRegexLiteral(source: string, start: number): number;
export declare function isRegexLiteralStart(sourceLike: string | string[], slashIndex: number): boolean;
export declare function getPreviousSignificantToken(sourceLike: string | string[], beforeIndex: number): string;
export declare function getPreviousSignificantTokenInfo(sourceLike: string | string[], beforeIndex: number): {
    token: string;
    start: number;
    end: number;
};
export declare function skipQuotedLiteral(source: string, start: number, quote: string): number;
export declare function skipTemplateLiteral(source: string, start: number): number;
export declare function findFunctionRanges(masked: string): SourceRange[];
export declare function collectAstFunctionBodyRanges(ast: unknown): SourceRange[];
export declare function collectFunctionRanges(masked: string, pattern: RegExp, ranges: SourceRange[]): void;
export declare function collectArrowExpressionRanges(masked: string, ranges: SourceRange[]): void;
export declare function collectMethodFunctionRanges(masked: string, ranges: SourceRange[]): void;
export declare function findBraceBodyAfter(masked: string, afterIndex: number): SourceRange | undefined;
export declare function collectMethodCandidates(masked: string): {
    paramsStart: number;
    paramsEnd: number;
    bodyRange: SourceRange;
}[];
export declare function collectComputedMethodCandidates(masked: string, candidates: Array<{
    paramsStart: number;
    paramsEnd: number;
    bodyRange: SourceRange;
}>): void;
export declare function findMethodPrefixToken(masked: string, beforeIndex: number): string;
export declare function findArrowExpressionEnd(masked: string, start: number): number;
export declare function findMatchingBrace(masked: string, openBrace: number): number;
export declare function findMatchingDelimiter(masked: string, openIndex: number): number;
export declare function collectBraceRanges(masked: string): SourceRange[];
export declare function collectStaticBlockRanges(masked: string): SourceRange[];
export declare function mergeRanges(ranges: SourceRange[]): SourceRange[];
export declare function isInsideRanges(index: number, ranges: SourceRange[]): boolean;
export declare function findMatches(masked: string, pattern: RegExp): {
    index: number;
    match: string;
}[];
export declare function trimBindingElement(pattern: string): string;
export declare function stripEnclosure(pattern: string, open: string, close: string): string;
export declare function splitTopLevel(value: string, separator: string): string[];
export declare function splitTopLevelWithRanges(value: string, separator: string): CallArgumentSource[];
export declare function findTopLevelChar(value: string, target: string): number;
export declare function readLeadingStringLiteral(value: string): {
    value: string;
    end: number;
};
export declare function readCompleteStringLiteral(value: string): {
    value: string;
    end: number;
};
export declare function skipJavaScriptTrivia(value: string, start: number): number;
export declare function getCallFirstArgumentSource(source: string, masked: string, index: number): string;
export declare function getCallArgumentSources(source: string, masked: string, index: number): CallArgumentSource[];
export declare function getCallArgumentSource(source: string, masked: string, index: number): string;
export declare function escapeRegExp(value: string): string;
export declare function getAstSource(node: any, source: string): string;
