/** * ESM Helpers * * Provides __dirname and __filename equivalents for ES modules. * In ESM, these CommonJS globals are not available, so we need to derive them * from import.meta.url. */ /** * Get __dirname equivalent in ESM * * @param importMetaUrl - Pass import.meta.url from the calling module * @returns The directory path of the calling module * * @example * ```ts * import { getDirname } from './utils/esm-helpers.js'; * const __dirname = getDirname(import.meta.url); * ``` */ export declare function getDirname(importMetaUrl: string): string; /** * Get __filename equivalent in ESM * * @param importMetaUrl - Pass import.meta.url from the calling module * @returns The file path of the calling module * * @example * ```ts * import { getFilename } from './utils/esm-helpers.js'; * const __filename = getFilename(import.meta.url); * ``` */ export declare function getFilename(importMetaUrl: string): string; /** * Get both __dirname and __filename at once * * @param importMetaUrl - Pass import.meta.url from the calling module * @returns Object with __dirname and __filename * * @example * ```ts * import { getFilePaths } from './utils/esm-helpers.js'; * const { __dirname, __filename } = getFilePaths(import.meta.url); * ``` */ export declare function getFilePaths(importMetaUrl: string): { __dirname: string; __filename: string; }; //# sourceMappingURL=esm-helpers.d.ts.map