import type * as ts from 'typescript';
export declare namespace UtilsTypescript {
    /**
     * Remove TypeScript region blocks by their name, including nested regions.
     *
     * @param sourceCode - The TypeScript source code as a string.
     * @param regionName - The name of the region to remove.
     * @returns Modified TypeScript code without the specified regions.
     */
    export const removeRegionByName: (sourceCode: string, regionName: string) => string;
    export interface ExportInfo {
        type: 'class' | 'function' | 'const' | 'let' | 'var' | 'enum' | 'type' | 'interface' | 'default' | 'module' | 'namespace';
        name: string;
    }
    /**
     * Function to extract exports from a TypeScript file
     */
    export const exportsFromFile: (filePath: string) => ExportInfo[];
    /**
     * Function to extract exports from a TypeScript file
     */
    export const exportsFromContent: (fileContent: string) => ExportInfo[];
    export type RedefinedExportInfo = {
        exportedName: string;
        originalName: string;
        from: string | null;
        isStarExport: boolean;
    };
    /**
     * Extracts redefined exports like:
     *   export { Column as CustomColumn } from 'x';
     *   export { Foo } from 'y';
     *   export * from 'z';
     */
    export const exportsRedefinedFromContent: (fileContent: string) => RedefinedExportInfo[];
    /**
     * Function to extract exports from a TypeScript file
     */
    export const exportsRedefinedFromFile: (filePath: string) => RedefinedExportInfo[];
    export const extractDefaultClassNameFromString: (sourceCode: string) => string | undefined;
    export const extractClassNameFromString: (sourceCode: string) => string[];
    export const extractClassNamesFromFile: (absoluteFilePath: string) => string[];
    export const extractDefaultClassNameFromFile: (absoluteFilePath: string) => string;
    export const formatFile: (absPathToFile: string | string[]) => void;
    export const formatAllFilesInsideFolder: (absPathToFolder: string) => void;
    export const eslintFixFile: (absPathToFile: string | string[]) => void;
    export const eslintFixAllFilesInsideFolderAsync: (absPathToFolder: string | string[]) => Promise<void>;
    /**
     * @deprecated use eslintFixAllFilesInsideFolderAsync
     */
    export const eslintFixAllFilesInsideFolder: (absPathToFolder: string | string[]) => void;
    export const getTaonContextFromContent: (fileContent: string) => string[];
    export const getTaonContextsNamesFromFile: (tsAbsFilePath: string) => string[];
    export const extractAngularComponentSelectors: (fileAbsPath: string) => {
        className: string;
        selector: string;
    }[];
    export const wrapWithComment: (oneLineComment: string, absDestFilePath: string) => any;
    /**
     * Attempts to set or add an exported const with given name and value.
     */
    export const setValueToVariableInTsFile: (tsAbsFilePath: string, variableName: string, valueOfVariable: any, options?: {
        skipAddIfNotExists?: boolean;
        useRawStringValue?: boolean;
    }) => void;
    export class TsImportExport {
        /**
         * for external modification
         */
        embeddedPathToFileResult: string;
        /**
         * for external modification
         */
        packageName: string;
        /**
         * for external modification
         */
        isIsomorphic?: boolean;
        readonly type: 'export' | 'import' | 'async-import' | 'require';
        /**
         * ORIGNAL
         * Name of the file that is being imported/exported
         * with parenthesis included , example
         * 'my-file' or "my-file" or `my-file`
         */
        readonly embeddedPathToFile: string;
        /**
         * same as cleanEmbeddedPathToFile but without quotes (parenthesis), example:
         * my-file or my-file or my-file
         */
        readonly cleanEmbeddedPathToFile: string;
        readonly startRow: number;
        readonly startCol: number;
        readonly endRow: number;
        readonly endCol: number;
        readonly parenthesisType: 'single' | 'double' | 'tics';
        readonly importElements: string[];
        constructor(type: 'export' | 'import' | 'async-import' | 'require', embeddedPathToFile: string, start: ts.LineAndCharacter, end: ts.LineAndCharacter, parenthesisType: 'single' | 'double' | 'tics', importElements?: string[]);
        private removeStartEndQuotes;
        /**
         * it will extract part of the file content
         * that is between startRow, startCol and endRow, endCol
         * and contains import/export/require statement
         */
        getStringPartFrom(wholeContentOfFile: string): string;
        wrapInParenthesis(str: string): string;
    }
    export const recognizeImportsFromFile: (fileAbsPAth: string) => TsImportExport[];
    export const recognizeImportsFromContent: (fileContent: string) => TsImportExport[];
    export type RenamedImportOrExport = {
        elementName: string;
        renamedAs: string;
        packageName?: string;
    };
    export const extractRenamedImportsOrExport: (content: string) => RenamedImportOrExport[];
    /**
     * Transition methods ng18 => ng19
     * Adds standalone: false if not exists in component decorator
     */
    export function transformComponentStandaloneOption(sourceText: string): string;
    export const fixHtmlTemplatesInDir: (directoryPath: string) => void;
    export function removeTaggedImportExport(tsFileContent: string, tags: string[], replaceWithEmptyLine?: boolean): string;
    export function removeTaggedArrayObjects(tsFileContent: string, tags: string[], replaceWithEmptyLine?: boolean): string;
    export function removeTaggedLines(tsFileContent: string, tags: string[], replaceWithEmptyLine?: boolean): string;
    export function addBelowPlaceholder(tsFileContent: string, placeholderTag: string, contentToAdd: string): string;
    export const wrapFirstImportsInImportsRegion: (fileContent: string) => string;
    /**
     * wrap class field with decorators
     * wrap class methods with decorators
     */
    export function wrapContentClassMembersDecoratorsWithRegion(classFileContent: string, wrapTag?: string): string;
    export type FlattenMapping = {
        [modulePath: string]: {
            [oldQualifiedName: string]: string;
        };
    };
    export function transformFlatImports(sourceText: string, mapping: FlattenMapping): string;
    export const clearRequireCacheRecursive: (modulePath: string, seen?: Set<string>) => void;
    /**
     * Make all properties of T and its nested objects writable (non-readonly).
     */
    export type DeepWritable<T> = {
        -readonly [P in keyof T]: T[P] extends object ? T[P] extends Function ? T[P] : DeepWritable<T[P]> : T[P];
    };
    export const addOrUpdateImportIfNotExists: (tsFileContent: string, identifiers: string | string[], fromModule: string) => string;
    export const migrateFromNgModulesToStandaloneV21: (tsFileContent: string, projectName: string) => string;
    /**
     * Calculate relative import path between two project-relative files.
     *
     * @example
     * calculateRelativeImportPath(
     *   'mypath/to/file/here.ts',
     *   'mypath/to/other/file/there.ts'
     * )
     * => '../other/file/there'
     */
    export const calculateRelativeImportPath: (fileRelativePathFrom: string, fileRelativePathTo: string) => string;
    export const injectImportsIntoImportsRegion: (content: string, importsToAdd: string[]) => string;
    export interface ParsedTsDiagnostic {
        code?: number | string;
        category?: string;
        message: string;
        file?: string;
        line?: number;
        character?: number;
    }
    export function parseTsDiagnostic(diagnostic: ts.Diagnostic | any): ParsedTsDiagnostic[];
    export const NSSPLITNAMESAPCE = "__NS__";
    export const hoistTrailingChainComments: (code: string) => string;
    export const normalizeBrokenLines: (code: string) => string;
    export const collapseFluentChains: (code: string) => string;
    export interface SplitNamespaceResult {
        content?: string;
        /**
         * EXAMPLE:
         *  namespacesMapObj: {
         *  'Utils.wait': 'Utils_wait',
         *  'Utils.waitMilliseconds': 'Utils_waitMilliseconds',
         * }
         */
        namespacesMapObj: {
            [namespaceDotPath: string]: string;
        };
        /**
         * namespacesReplace: {
         *  Utils: [
         *  'Utils_DbBinaryFormat',
         *  'Utils_DbBinaryFormatEnum',
         *  ],
         *  UtilsCliClassMethod: [
         *  'UtilsCliClassMethod_CLI_METHOD_KEY',
         *  'UtilsCliClassMethod_argsToParse',
         *  ]
         * }
         */
        namespacesReplace: {
            [rootNamespace: string]: string[];
        };
        /**
         * Everything from namespacesMapObj except types, interfaces etc.
         */
        namespacesMapObjJS?: {
            [namespaceDotPath: string]: string;
        };
        /**
         * Everything from namespacesReplace except types, interfaces etc.
         */
        namespacesReplaceJS?: {
            [rootNamespace: string]: string[];
        };
    }
    export const splitNamespaceForContent: (content: string) => SplitNamespaceResult;
    export const splitNamespaceForFile: (fileAbsPath: string) => string;
    export const replaceNamespaceWithLongNames: (content: string, namespacesMapObj: SplitNamespaceResult["namespacesMapObj"]) => string;
    export const replaceImportNamespaceWithWithExplodedNamespace: (content: string, namespacesReplace: SplitNamespaceResult["namespacesReplace"], renamedImportsOrExports: RenamedImportOrExport[], currentPackageName: string, replaceInAllImports?: boolean) => string;
    export const updateSplitNamespaceResultMapReplaceObj: (result: SplitNamespaceResult, renamedList: RenamedImportOrExport[]) => SplitNamespaceResult;
    export const updateSplitNamespaceReExports: (splitNamespacesForPackages: Map<string, UtilsTypescript.SplitNamespaceResult>, reExports: Map<string, UtilsTypescript.GatheredExportsMap>) => void;
    type PackageName = string;
    export type ExportedThirdPartyNamespaces = '*' | string[];
    export type GatheredExportsMap = {
        [packageName: string]: ExportedThirdPartyNamespaces;
    };
    export const gatherExportsMapFromIndex: (pathToIndexTs: string, isomorphicImportsMap: Map<PackageName, SplitNamespaceResult>) => GatheredExportsMap;
    export const getCleanImport: (importName: string) => string | undefined;
    export const refactorClassToNamespace: (sourceText: string) => string;
    /**
     * @param tsContent TypeScript file content
     * @param absTsFile needed for debugging
     * @returns js content
     */
    export const stripTsTypesIntoJsFromContent: (tsContent: string, absTsFile: string) => string;
    export const stripTsTypesIntoJs: (entrypointFolderAbsPathWithIndexTs: string, outFolderWithIndexJS: string) => Promise<void>;
    export const fileHasDefaultExport: (absFilePath: string) => boolean;
    export const hasDefaultExport: (sourceText: string) => boolean;
    export const removeFirstLevelRegionsInFile: (filePath: string) => void;
    export const removeFirstLevelRegions: (content: string) => string;
    export const addExportToNotExportedFirstLevelSymbolsInFile: (filePath: string) => void;
    export const addExportToNotExportedFirstLevelSymbolsInContent: (content: string) => string;
    export {};
}
