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

Function html

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

Source from the content-addressed store, hash-verified

251 >
252 (html: string): HttpServerResponse
253} = (
254 strings: TemplateStringsArray | string,
255 ...args: ReadonlyArray<Template.Interpolated>
256) => {
257 if (typeof strings === "string") {
258 return text(strings, { contentType: "text/html" })
259 }
260
261 return Effect.map(Template.make(strings, ...args), (_) => text(_, { contentType: "text/html" })) as any
262}
263
264/**
265 * 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