Files
AFFiNE/packages/frontend/component/src/lit-react/utils.ts
T
2025-01-23 07:12:17 +00:00

10 lines
254 B
TypeScript

import type { TemplateResult } from 'lit';
export function templateToString({ strings, values }: TemplateResult): string {
return strings.reduce(
(result, str, i) =>
result + str + (i < values.length ? String(values[i]) : ''),
''
);
}