MCPcopy
hub / github.com/Effect-TS/effect / htmlStream

Function htmlStream

packages/platform/src/internal/httpServerResponse.ts:175–193  ·  view source on GitHub ↗
(
  strings: TemplateStringsArray,
  ...args: A
)

Source from the content-addressed store, hash-verified

173
174/** @internal */
175export const htmlStream = <A extends ReadonlyArray<Template.InterpolatedWithStream>>(
176 strings: TemplateStringsArray,
177 ...args: A
178): Effect.Effect<
179 ServerResponse.HttpServerResponse,
180 never,
181 Template.Interpolated.Context<A[number]>
182> =>
183 Effect.map(
184 Effect.context<any>(),
185 (context) =>
186 stream(
187 Stream.provideContext(
188 Stream.encodeText(Template.stream(strings, ...args)),
189 context
190 ),
191 { contentType: "text/html" }
192 )
193 )
194
195/** @internal */
196export const json = (

Callers

nothing calls this directly

Calls 4

streamFunction · 0.70
mapMethod · 0.65
contextMethod · 0.65
streamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…