import ts from 'typescript'; /** * CommonJS to ESM transformer options */ export interface ICjsToEsmTransformerOptions { /** * Optional filtering callback to indicate whether to * transform a `require(request)` call to an import statement, * based on its request string. */ shouldTransform?(request: string): boolean; } /** * Transforms CommonJS calls/exports to ESM syntax. * If a source file is identified as using `require`, `module`, or `exports`, * it is wrapped with the following: * ``` * [generated imports] * let exports = {}, module = { exports } * * [original code] * * export default module.exports * ``` * * Each `require(...)` call is converted to a generated import statement * with a unique identifier. */ export declare function createCjsToEsmTransformer(options?: ICjsToEsmTransformerOptions): ts.TransformerFactory; //# sourceMappingURL=cjs-to-esm-transformer.d.ts.map