import { ModuleLocator, TemplateLocator, AnnotatedModuleLocator } from '@glimmer/interfaces'; export interface Builtins { [key: string]: BuiltinLocator; } export declare type BuiltinLocator = TemplateLocator | HelperLocator | ModuleLocator; /** * There are two ways helpers may be implemented in libraries: * * 1. A "user helper" that is a pure JavaScript function that takes one or more * parameters and named arguments and returns a value. * 2. A "low-level helper", a factory function that takes the VM instance and a * stable Arguments object and returns a Reference. * * Encoding which type a helper is is important, because user helpers must be * wrapped in the appropriate Reference in order to function. Thus, locators for * a helper must notate whether the helper is low-level or not. */ export interface HelperLocator extends AnnotatedModuleLocator { kind: 'helper'; meta: { factory?: boolean; }; } export declare type ModulePath = string; export declare type Name = string; export declare type Identifier = string; export interface BuiltinsMap { byName: Map; byIdentifier: Map>; byModulePath: Map; }