annotations
API reference for @effx/compiler/lift/annotations
annotations.ts overview
Exports Grouped by Category
utils
StepRead (type alias)
What one annotateMerge or application step contributed.
Signature
type StepRead =
| { readonly _tag: "Metadata"; readonly patch: MetadataUse }
| { readonly _tag: "Access"; readonly use: AccessUse }
| { readonly _tag: "Failed" }annotationKeyOf
The key an .annotate(Key, value) step names for its faithful 3001 diagnostic (the blank reject text).
Signature
declare const annotationKeyOf: (step: Extract<StepRecord, { readonly _tag: "Method" }>) => stringmergeMetadata
Merges metadata contributions; two different values for one field are a cause, never a silent choice.
Signature
declare const mergeMetadata: (
current: MetadataUse | undefined,
patch: MetadataUse
) => Result.Result<MetadataUse, string>readAccessBuilder
Access through a registered builder and its data template.
Signature
declare const readAccessBuilder: (scope: Scope, cursor: Cursor, view: CallView, rule: AccessRule) => StepReadreadAccessGenerated
Access in the generator's own spelling: annotator({ exposure, …, canonicalScopeResolver, … }).
Signature
declare const readAccessGenerated: (scope: Scope, cursor: Cursor, view: CallView, rule: AccessRule) => StepReadreadAnnotate
The one real .annotate reader of the lift core (spec 0019 §5, S1).
Signature
declare const readAnnotate: (
scope: Scope,
step: Extract<StepRecord, { readonly _tag: "Method" }>,
definitionAnnotations: ReadonlyArray<Annotation>
) => Option.Option<Annotation>readAnnotateMerge
.annotateMerge(X): native OpenAPI metadata, a registered metadata helper, or a registered access helper.
Signature
declare const readAnnotateMerge: (scope: Scope, step: Extract<StepRecord, { readonly _tag: "Method" }>) => StepReadreadApply
.pipe((e) => W(e, builder(args))) and W(endpoint, builder(args)): access through a registered applier.
Signature
declare const readApply: (scope: Scope, step: Extract<StepRecord, { readonly _tag: "Apply" }>) => StepRead