MCPcopy Create free account
hub / github.com/Effect-TS/effect / html

Function html

packages/effect/src/unstable/http/HttpServerResponse.ts:235–244  ·  view source on GitHub ↗
(
  strings: TemplateStringsArray | string,
  ...args: ReadonlyArray<Template.Interpolated>
)

Source from the content-addressed store, hash-verified

233 >
234 (html: string): HttpServerResponse
235} = (
236 strings: TemplateStringsArray | string,
237 ...args: ReadonlyArray<Template.Interpolated>
238) => {
239 if (typeof strings === "string") {
240 return text(strings, { contentType: "text/html" })
241 }
242
243 return Effect.map(Template.make(strings, ...args), (_) => text(_, { contentType: "text/html" })) as any
244}
245
246/**
247 * Creates a streaming HTML response from a template.

Callers

nothing calls this directly

Calls 3

textFunction · 0.70
makeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected