MCPcopy Create free account
hub / github.com/cloudflare/templates / constructor

Method constructor

nlweb-template/src/ask/stream-wrapper.ts:7–10  ·  view source on GitHub ↗
(writable: WritableStream<Uint8Array>)

Source from the content-addressed store, hash-verified

5 private encoder: TextEncoder;
6
7 constructor(writable: WritableStream<Uint8Array>) {
8 this.writer = writable.getWriter();
9 this.encoder = new TextEncoder();
10 }
11
12 /**
13 * Writes a JSON object to the SSE stream.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected