deltas
API reference for @effx/compiler/lift/deltas
deltas.ts overview
Exports Grouped by Category
utils
CompareOutcome (type alias)
The comparison's own outcome: a Pass owns the applied Δ evidence, a Mismatch owns the differences.
Signature
type CompareOutcome =
| { readonly _tag: "Pass"; readonly applied: ReadonlyArray<DeltaClass> }
| { readonly _tag: "Mismatch"; readonly differences: ReadonlyArray<string> }DeltaClass (type alias)
One Δ class of the frozen closed set (spec 0019 §2.2).
Signature
type DeltaClass = "ref-suffix" | "explicit-default-identifier" | "endpoint-order"EndpointSegments (interface)
The endpoint-keyed map Δ3 builds once, with real duplicate-key reports.
Signature
export interface EndpointSegments {
readonly map: Map<string, EndpointReflection>
readonly duplicates: ReadonlyArray<string>
}JsonObjectNode (interface)
One JSON object at the leaf of a reflection document: a plain string-keyed record of JSON values.
Signature
export interface JsonObjectNode {
readonly [key: string]: Schema.Json
}SuffixCollapse (interface)
Signature
export interface SuffixCollapse {
readonly document: Schema.Json
readonly collapsed: boolean
}collapseSuffixPass
One Δ1 pass over the exact frozen premise: <N>_<k> collapses onto the plain base N only when both
exist and their values deep-equal, and $ref pointers reaching the suffixed name are rewritten.
Chained suffixes (N_2 onto N_1) stay out: Effect's converter names every duplicate from the base
directly, and a chain collapse would add a tolerance the frozen Δ list does not own.
Signature
declare const collapseSuffixPass: (document: Schema.Json) => SuffixCollapsedefaultOperationId
The operation id Effect derives when an endpoint carries no explicit identifier annotation.
Signature
declare const defaultOperationId: (group: string, identifier: string) => stringdropDefaultIdentifier
Drops the recorded OpenApi/Identifier annotation from each endpoint where the actual merged Context
value (identifierAnnotation witness) equals the endpoint's default <group>.<endpointKey>. The key
and its value leave together; a non-default value is preserved. A record without the key or without the
witness never fires: absence is not evidence.
Signature
declare const dropDefaultIdentifier: (endpoints: ReadonlyArray<EndpointReflection>) => ReadonlyArray<EndpointReflection>endpointKeyOf
(group, identifier) of one endpoint record, the map key Δ3 compares through.
Signature
declare const endpointKeyOf: (endpoint: EndpointReflection) => stringwireCompare
The mechanical comparison (spec 0019 §2.2): endpoint sets mapped by (group, identifier) (Δ3, always
applied; listed only when the raw orders differed), the whole OpenAPI document compared after Δ1's
collapse and $ref rewrite, and per-endpoint records compared after Δ2's actual-default-identifier
drop. Any other difference fails with the differing path.
Signature
declare const wireCompare: (original: Reflection, generated: Reflection) => CompareOutcome