import ModuleLocatorMap from './module-locator-map'; import { ModuleLocator } from '@glimmer/interfaces'; /** * Maps ModuleLocators to their associated handles, and vice versa. The table * tracks both application handles (used to map symbolic references at compile * time into concrete objects at runtime) and VM handles (used to track the * offset of a compiled template in the binary program). * * Host environments can use this module table, provided at the end of * compilation, to codegen a similar data structure in the compiled JavaScript * output that allows the resolver to exchange handles for concrete module * values at runtime. */ export default class ExternalModuleTable { byModuleLocator: ModuleLocatorMap; byHandle: Map; vmHandleByModuleLocator: ModuleLocatorMap; byVMHandle: Map; /** * Returns the handle (unique integer id) for the provided module locator. If * the locator has not been seen before, a new handle is assigned. Otherwise, * the same handle is always returned for a given locator. */ handleForModuleLocator(locator: ModuleLocator): number; } //# sourceMappingURL=external-module-table.d.ts.map