MCPcopy Index your code
hub / github.com/anomalyco/opencode / renderEffectFiles

Function renderEffectFiles

packages/httpapi-codegen/src/index.ts:308–322  ·  view source on GitHub ↗
(groups: ReadonlyArray<Group>)

Source from the content-addressed store, hash-verified

306}
307
308function renderEffectFiles(groups: ReadonlyArray<Group>): Output["files"] {
309 return [
310 ...groups.map((group, index) => ({ path: `${group.module}.ts`, content: renderGroup(group, index) })),
311 {
312 path: "client-error.ts",
313 content:
314 'import { Schema } from "effect"\n\nexport class ClientError extends Schema.TaggedErrorClass<ClientError>()("ClientError", {\n cause: Schema.Defect(),\n}) {}\n',
315 },
316 { path: "client.ts", content: renderClient(groups) },
317 {
318 path: "index.ts",
319 content: 'export { ClientError } from "./client-error"\nexport * as OpenCode from "./client"\n',
320 },
321 ]
322}
323
324function renderImportedEffectFiles(
325 groups: ReadonlyArray<Group>,

Callers 1

emitEffectFunction · 0.85

Calls 2

renderGroupFunction · 0.85
renderClientFunction · 0.85

Tested by

no test coverage detected