import type { Editor } from 'mem-fs-editor'; import type { FileContentPosition, ManifestData } from './types.js'; /** * Method inserts passed text into content by char index position. * In case if position is out of range, then whitespaces would be created. * Negative positions are not supported. * * @param {string} text - text to insert * @param {string} content - target content for update * @param {number} position - Char index position to insert in * @returns new content with inserted text */ export declare function insertTextAtAbsolutePosition(text: string, content: string, position: number): string; /** * Method inserts passed text into content by line and char position. * In case if position is out of range, then whitespaces would be created. * Negative positions are not supported. * * @param {string} text - text to insert * @param {string} content - target content for update * @param {FileContentPosition} position - Line and char position to insert in * @returns new content with inserted text */ export declare function insertTextAtPosition(text: string, content: string, position: FileContentPosition): string; /** * Adds type extensions for sap.fe types if an older version is used. * The types were fixed in 1.108 and downported to 1.102. * * @param basePath - the base path * @param minUI5Version - minimal required UI5 version * @param fs - the memfs editor instance */ export declare function addExtensionTypes(basePath: string, minUI5Version: string | undefined, fs: Editor): void; /** * Gets manifest path. * * @param {string} basePath the base path * @param {Editor} fs the memfs editor instance * @returns {Manifest | undefined} path to manifest file */ export declare function getManifestPath(basePath: string, fs: Editor): Promise; /** * Gets content and path of the manifest. * * @param {string} basePath the base path * @param {Editor} fs the memfs editor instance * @param {boolean} [validate] validate if 'manifest.json' file exists - throw error if file does not exist * @returns {Manifest | undefined} The content and path of the manifest */ export declare function getManifest(basePath: string, fs: Editor, validate?: boolean): Promise; /** * Method validates if passed id is available. * * @param fs - the file system object for reading files * @param viewOrFragmentPath - path to fragment or view file * @param id - id to check/validate * @returns true if passed id is available. */ export declare function isElementIdAvailable(fs: Editor, viewOrFragmentPath: string, id: string): boolean; //# sourceMappingURL=utils.d.ts.map