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

Function renderAnnotations

packages/effect/src/internal/schema/toCodeDocument.ts:51–62  ·  view source on GitHub ↗
(
  annotations: Schema.Annotations.Annotations | undefined
)

Source from the content-addressed store, hash-verified

49}
50
51function renderAnnotations(
52 annotations: Schema.Annotations.Annotations | undefined
53): string | undefined {
54 if (annotations === undefined) return undefined
55 const entries: Array<string> = []
56 for (const [key, value] of Object.entries(annotations)) {
57 if (InternalAnnotations.annotationExcludedKeys.has(key)) continue
58 const rendered = renderEmittableAnnotation(value)
59 if (rendered !== undefined) entries.push(`${formatPropertyKey(key)}: ${rendered}`)
60 }
61 return entries.length === 0 ? undefined : `{ ${entries.join(", ")} }`
62}
63
64/** @internal */
65export function sanitizeJavaScriptIdentifier(input: string): string {

Callers 1

runtimeAnnotateFunction · 0.85

Calls 5

formatPropertyKeyFunction · 0.90
pushMethod · 0.80
joinMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected