( strings: TemplateStringsArray, ...values: unknown[] )
| 230 | } |
| 231 | |
| 232 | export function html( |
| 233 | strings: TemplateStringsArray, |
| 234 | ...values: unknown[] |
| 235 | ): string { |
| 236 | const bodyContent = strings.reduce((acc, str, i) => { |
| 237 | return acc + str + (values[i] || ''); |
| 238 | }, ''); |
| 239 | |
| 240 | return `<!DOCTYPE html> |
| 241 | <html lang="en"> |
| 242 | <head> |
| 243 | <meta charset="UTF-8" /> |
| 244 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 245 | <title>My test page</title> |
| 246 | </head> |
| 247 | <body> |
| 248 | ${bodyContent} |
| 249 | </body> |
| 250 | </html>`; |
| 251 | } |
| 252 | |
| 253 | export function stabilizeStructuredContent(content: unknown): unknown { |
| 254 | if (typeof content === 'string') { |
no outgoing calls
searching dependent graphs…