Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderComponent(
name: string,
args: Dict>,
element: SimpleElement,
dyanmicScope?: DynamicScope
): RenderResult {
let bundleCompiler = this.getBundleCompiler();
this.addRegisteredComponents(bundleCompiler);
let compilationResult = bundleCompiler.compile();
let cursor = { element, nextSibling: null };
let runtime = this.getRuntimeContext(compilationResult);
let builder = this.getElementBuilder(runtime.env, cursor);
let iterator = renderAotComponent(
runtime,
builder,
compilationResult.main,
name,
args,
dyanmicScope
);
return renderSync(runtime.env, iterator);
}
async getComponentTemplateIterator(
app: BaseApplication,
env: Environment,
builder: ElementBuilder,
componentName: string,
args: RenderComponentArgs,
dynamicScope: DynamicScope
): Promise {
const runtime = await this.getRuntime(app, env);
return renderAotComponent(runtime, builder, 0, componentName, args, dynamicScope);
}