import { DeclarationOptions } from './module.declarator'; /** * The `MetadataManager` class provides utilities for managing metadata entries * within a `@Module` decorator in a TypeScript source file. It allows for the * insertion of new metadata entries, merging symbols with static options, and * handling various scenarios such as empty module decorators or existing metadata * properties. */ export declare class MetadataManager { private content; constructor(content: string); /** * Inserts a new metadata entry into the `@Module` decorator. * * @param metadata - The metadata key to insert. * @param symbol - The symbol to insert. * @param staticOptions - The static options to insert. * @returns The new content string. */ insert(metadata: string, symbol: string, staticOptions?: DeclarationOptions['staticOptions']): string | undefined; /** * Finds the first `@Module` decorator metadata in the source file. * * @param source - The source file to search. * @param identifier - The identifier to match. * @returns The first matching `ObjectLiteralExpression` or undefined. */ private findFirstDecoratorMetadata; /** * Returns an array of all nodes in the source file. */ private getSourceNodes; /** * Inserts a new metadata entry into an empty `@Module` decorator. * This method is called when the `@Module` decorator has no properties. * It inserts the metadata and symbol into the decorator. * @param expr - The `@Module` decorator node. * @param metadata - The metadata key to insert. * @param symbol - The symbol to insert. * @returns The new content string. */ private insertMetadataToEmptyModuleDecorator; /** * Inserts a new symbol into an existing metadata property in the `@Module` decorator. * This method is called when the metadata property already exists in the decorator. * It inserts the symbol into the existing metadata property. * @param source - The source file. * @param matchingProperties - The matching metadata properties. * @param symbol - The symbol to insert. * @param staticOptions - The static options to insert. * @returns The new content string. */ private insertNewMetadataToDecorator; /** * Inserts a new symbol into an existing metadata property in the `@Module` decorator. * This method is called when the metadata property already exists in the decorator. * It inserts the symbol into the existing metadata property. * @param source - The source file. * @param matchingProperties - The matching metadata properties. * @param symbol - The symbol to insert. * @param staticOptions - The static options to insert. * @returns The new content string. */ private insertSymbolToMetadata; /** * Merges a symbol with static options into a single string. * @param symbol - The symbol to merge. * @param staticOptions - The static options to merge. * @returns The merged string. */ private mergeSymbolAndExpr; /** * Adds blank lines around an expression. */ private addBlankLines; }