MCPcopy Index your code
hub / github.com/Effect-TS/effect / processAnnotation

Function processAnnotation

packages/platform/src/OpenApi.ts:167–176  ·  view source on GitHub ↗

* This function checks if a given tag exists within the provided context. If * the tag is present, it retrieves the associated value and applies the given * callback function to it. If the tag is not found, the function does nothing.

(
  ctx: Context.Context<Services>,
  tag: Context.Tag<I, S>,
  f: (s: S) => void
)

Source from the content-addressed store, hash-verified

165 * callback function to it. If the tag is not found, the function does nothing.
166 */
167function processAnnotation<Services, S, I>(
168 ctx: Context.Context<Services>,
169 tag: Context.Tag<I, S>,
170 f: (s: S) => void
171) {
172 const o = Context.getOption(ctx, tag)
173 if (Option.isSome(o)) {
174 f(o.value)
175 }
176}
177
178/**
179 * @since 1.0.0

Callers 4

fromApiFunction · 0.85
onGroupFunction · 0.85
onEndpointFunction · 0.85
makeSecuritySchemeFunction · 0.85

Calls 2

getOptionMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…