headline/view/helpers.ts
Ondřej Nývlt 90b9f67827 Refactor
2023-09-05 22:06:39 +02:00

16 lines
371 B
TypeScript

/**
* No-op tag function for CSS tagged templates, which works only as a hint for IDE for CSS syntax highlighting.
*/
export function css(
strings: TemplateStringsArray,
...exprs: Array<unknown>
): string {
let result = strings[0];
for (let i = 1, l = strings.length; i < l; i++) {
result += exprs[i - 1];
result += strings[i];
}
return result;
}