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

Function apply

packages/core/src/state.ts:72–76  ·  view source on GitHub ↗
(transform: TransformCallback<DraftApi>, draft: DraftApi)

Source from the content-addressed store, hash-verified

70 })
71
72 const apply = (transform: TransformCallback<DraftApi>, draft: DraftApi) =>
73 Effect.suspend(() => {
74 const result = transform(draft)
75 return Effect.isEffect(result) ? Effect.asVoid(result).pipe(Effect.orDie) : Effect.void
76 })
77
78 const materialize = Effect.fnUntraced(function* () {
79 const next = options.initial()

Callers 3

createFunction · 0.70
onApplyFunction · 0.50
authFunction · 0.50

Calls 1

transformFunction · 0.85

Tested by

no test coverage detected