import type typescript from 'typescript'; import type * as Assembler from '@adonisjs/assembler'; import { type RecursiveFileTree } from '@adonisjs/assembler/types'; import { type ApplicationService } from './types.ts'; /** * Imports the AdonisJS assembler package optionally. This function attempts * to import the assembler and returns undefined if it's not available, * making it safe to use in environments where the assembler might not be installed. * * @param app - The application service instance used for importing the assembler * * @example * const assembler = await importAssembler(app) * if (assembler) { * // Use assembler functionality * const generator = new assembler.IndexGenerator() * } */ export declare function importAssembler(app: ApplicationService): Promise; /** * Imports the TypeScript compiler package optionally. This function attempts * to import TypeScript and returns undefined if it's not available, * making it safe to use in environments where TypeScript might not be installed. * * @param app - The application service instance used for importing TypeScript * * @example * const ts = await importTypeScript(app) * if (ts) { * // Use TypeScript compiler API * const program = ts.createProgram(['file.ts'], {}) * const sourceFile = program.getSourceFile('file.ts') * } */ export declare function importTypeScript(app: ApplicationService): Promise; /** * Outputs transformer data objects by generating TypeScript type definitions * for all transformers in the provided file tree. This function creates * InferData types for each transformer and organizes them in namespaces. * * @param transformersList - A recursive file tree containing transformer file paths * @param buffer - The file buffer to write the generated types to * * @example * const transformersList = { * User: '#app/transformers/user_transformer', * Auth: { * Login: '#app/transformers/auth/login_transformer' * } * } * await outputTransformerDataObjects(transformersList, buffer) * // Generates: * // export namespace Data { * // export type User = InferData * // export namespace Auth { * // export type Login = InferData * // } * // } */ export declare function outputTransformerDataObjects(transformersList: RecursiveFileTree, buffer: Assembler.FileBuffer, withSharedProps: boolean, inertiaMiddlewareImportPath?: string): Promise;