UNPKG

gather-ts

Version:

A powerful code analysis and packaging tool designed for creating AI-friendly code representations for javascript and typescript projects.

21 lines (20 loc) 851 B
import { BaseService } from "@/types/services"; import { ITemplateManager, ITemplateManagerDeps, ITemplateManagerOptions, ITemplate, ITemplateContext } from "./interfaces/ITemplateManager"; export declare class TemplateManager extends BaseService implements ITemplateManager { private readonly deps; private templates; private readonly debug; constructor(deps: ITemplateManagerDeps, options?: ITemplateManagerOptions); initialize(): Promise<void>; cleanup(): void; private logDebug; registerTemplate(template: ITemplate): void; getTemplate(id: string): ITemplate; hasTemplate(id: string): boolean; render(templateId: string, context: ITemplateContext): string; private validateTemplate; private validateContext; private applyDefaults; private extractVariables; private renderTemplate; }