[IMP] components: add test for template string in props

This commit is contained in:
Samuel Degueldre
2021-11-24 08:44:53 +01:00
committed by Aaron Bohy
parent 4866ed8e8a
commit 2943ca3921
3 changed files with 43 additions and 2 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ import { globalTemplates } from "./app/template_set";
// Global templates
// -----------------------------------------------------------------------------
export function xml(strings: TemplateStringsArray, ...args: any[]) {
export function xml(...args: Parameters<typeof String.raw>) {
const name = `__template__${xml.nextId++}`;
const value = String.raw(strings, ...args);
const value = String.raw(...args);
globalTemplates[name] = value;
return name;
}