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

Function pickAnnotations

packages/effect/src/SchemaAST.ts:2647–2658  ·  view source on GitHub ↗
(annotationIds: ReadonlyArray<symbol>)

Source from the content-addressed store, hash-verified

2645/** @internal */
2646export const pickAnnotations =
2647 (annotationIds: ReadonlyArray<symbol>) => (annotated: Annotated): Annotations | undefined => {
2648 let out: { [_: symbol]: unknown } | undefined = undefined
2649 for (const id of annotationIds) {
2650 if (Object.prototype.hasOwnProperty.call(annotated.annotations, id)) {
2651 if (out === undefined) {
2652 out = {}
2653 }
2654 out[id] = annotated.annotations[id]
2655 }
2656 }
2657 return out
2658 }
2659
2660/** @internal */
2661export const omitAnnotations =

Callers 1

SchemaAST.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected