import { BundleCompilationResult } from '@glimmer/bundle-compiler'; import { SymbolTable, ComponentCapabilities, ModuleLocator, TemplateLocator } from '@glimmer/interfaces'; import { Project } from 'glimmer-analyzer'; import { AppCompilerDelegateOptions, OutputFiles } from '../app-compiler-delegate'; import { Builtins, HelperLocator } from '../builtins'; import { AppCompilerDelegate } from '@glimmer/application'; export interface TemplateMeta { specifier: string; } export default class MUCompilerDelegate implements AppCompilerDelegate { projectPath: string; outputFiles: OutputFiles; protected project: Project; protected specifiersToSymbolTable: Map; protected builtins: Builtins; protected mainTemplateLocator: ModuleLocator; constructor({ mainTemplateLocator, projectPath, outputFiles, builtins, }: AppCompilerDelegateOptions); protected _builtins(): { mainTemplate: TemplateLocator; if: HelperLocator; action: HelperLocator; }; relativePath(module: string): string; /** * Converts absolute module paths into paths relative to the project root. */ normalizePath(modulePath: string): string; getSpecifier(locator: ModuleLocator): string; /** * Annotates the template locator with the Module Unification specifier * string. */ templateLocatorFor({ module, name }: ModuleLocator): TemplateLocator; generateDataSegment(compilation: BundleCompilationResult): string; hasComponentInScope(name: string, referrer: ModuleLocator): boolean; resolveComponent(name: string, referrer: ModuleLocator): ModuleLocator; getComponentCapabilities(): ComponentCapabilities; hasHelperInScope(helperName: string, referrer: ModuleLocator): boolean; resolveHelper(helperName: string, referrer: ModuleLocator): ModuleLocator; protected moduleLocatorFor(specifier: string): ModuleLocator; hasModifierInScope(_modifierName: string, _referrer: ModuleLocator): boolean; resolveModifier(_modifierName: string, _referrer: ModuleLocator): ModuleLocator; hasPartialInScope(_partialName: string, _referrer: ModuleLocator): boolean; resolvePartial(_partialName: string, _referrer: ModuleLocator): ModuleLocator; }