Skip to content

createAlpyneDefinitionAccess

createAlpyneDefinitionAccess(runtime): StrictAlpyneDefinitionAccess

Creates Template lookups over a composed Definition, resolving a PRN to its App and then to the Template within that App.

RuntimeDefinition

The Definition to look up Templates in.

StrictAlpyneDefinitionAccess

Strict lookups that throw on failure, with the safe variant under safe.

Lookups read the Definition directly, so repeated calls with the same PRN return the same TemplateDefinition object.

Resolving a Template for the UI

const access = createAlpyneDefinitionAccess(definition);
const employment = access.template('prn::hris:template/employment');
const maybe = access.safe.template(prn); // undefined when prn is not a known Template PRN