MCPcopy Create free account
hub / github.com/Effect-TS/effect / extractAnnotations

Function extractAnnotations

packages/platform/src/HttpApiSchema.ts:67–88  ·  view source on GitHub ↗
(ast: AST.Annotations)

Source from the content-addressed store, hash-verified

65 * @category annotations
66 */
67export const extractAnnotations = (ast: AST.Annotations): AST.Annotations => {
68 const result: Record<symbol, unknown> = {}
69 if (AnnotationStatus in ast) {
70 result[AnnotationStatus] = ast[AnnotationStatus]
71 }
72 if (AnnotationEmptyDecodeable in ast) {
73 result[AnnotationEmptyDecodeable] = ast[AnnotationEmptyDecodeable]
74 }
75 if (AnnotationEncoding in ast) {
76 result[AnnotationEncoding] = ast[AnnotationEncoding]
77 }
78 if (AnnotationParam in ast) {
79 result[AnnotationParam] = ast[AnnotationParam]
80 }
81 if (AnnotationMultipart in ast) {
82 result[AnnotationMultipart] = ast[AnnotationMultipart]
83 }
84 if (AnnotationMultipartStream in ast) {
85 result[AnnotationMultipartStream] = ast[AnnotationMultipartStream]
86 }
87 return result
88}
89
90const mergedAnnotations = (ast: AST.AST): Record<symbol, unknown> =>
91 ast._tag === "Transformation" ?

Callers 2

extractUnionTypesFunction · 0.70
needsOwnResponseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected