Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
compile(builder: ComponentLayoutBuilder) {
let env = builder.env;
let factory = templateFactory(this.template);
let layout = factory.create(env).asLayout();
builder.fromLayout(layout);
builder.attrs.static('class', 'glimmer-component');
// TODO builder.attrs.dynamic('role', ariaRole);
}
}
compile(template: string, meta: TemplateMeta = {}): Template {
let wrapper = JSON.parse(precompile(template, { meta }));
let factory = templateFactory(wrapper);
return factory.create(this.compileOptions);
}
compile(template: string, meta?: TemplateMeta): Template {
let wrapper = JSON.parse(precompile(template));
let factory = templateFactory(wrapper);
return factory.create(this.compileOptions, (meta || {}) as any as TemplateMeta);
}