Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
preprocess(
template: string,
meta?: AnnotatedModuleLocator
): Template> {
let wrapper = JSON.parse(precompile(template));
let factory = templateFactory(wrapper);
return factory.create(templateMeta(meta || DEFAULT_TEST_META));
}
getJitStaticLayout(
state: TestComponentDefinitionState,
resolver: LazyRuntimeResolver
): CompilableProgram {
return resolver.compilable(templateMeta(state.locator)).asLayout();
}
export function locatorFor(
moduleLocator: ModuleLocator
): TemplateMeta> {
let { module, name } = moduleLocator;
let l: TemplateLocator = {
module,
name,
kind: 'template',
meta: templateMeta({ locator: moduleLocator }),
};
return templateMeta(l);
}
getAotStaticLayout(
state: TestComponentDefinitionState,
resolver: AotRuntimeResolver
): Invocation {
let { locator } = state;
return resolver.getInvocation(templateMeta(locator.meta.locator));
}
export function locatorFor(
moduleLocator: ModuleLocator
): TemplateMeta> {
let { module, name } = moduleLocator;
let l: TemplateLocator = {
module,
name,
kind: 'template',
meta: templateMeta({ locator: moduleLocator }),
};
return templateMeta(l);
}
getAotStaticLayout(
state: EmberishCurlyComponentDefinitionState,
resolver: AotRuntimeResolver
): Invocation {
return resolver.getInvocation(templateMeta(state.locator));
}