effx
API reference@effx/compilerlift

check-facts

API reference for @effx/compiler/lift/check-facts

check-facts.ts overview


Exports Grouped by Category


utils

CheckFacts (interface)

The original group's facts, which add the unique root exactly as the model records it.

Signature

export interface CheckFacts extends GroupKeys {
  readonly groupId: string
  /** The identity literal of the unique original application root (`HttpApi.make(<rootId>)`). */
  readonly rootId: string
  /** The exported original application root whose composition stays untouched and UNVERIFIED. */
  readonly root: SymbolRef
}

GroupKeys (interface)

The group a model declares: its exported symbol and the keys of the endpoints it adds.

Signature

export interface GroupKeys {
  /** The exported group, resolved by the frontend. */
  readonly group: SymbolRef
  /** Every endpoint declaration key of the group: sorted, unique, literal. */
  readonly endpointKeys: ReadonlyArray<string>
  /** Endpoint declarations whose key is not a literal; when positive the key set is not provable. */
  readonly unreadableKeys: number
}

checkFactsOf

The facts of the group input.group selects, or none when the lift cannot select it (EFFX3008, blocked).

Signature

declare const checkFactsOf: (model: EffectModel, input: LiftInput, registry: LiftRegistry) => Option.Option<CheckFacts>

groupKeysOf

The one group of this id that module declares, without needing a root: the generated contract declares its group alone, but the program it is analyzed in also holds the ORIGINAL group (the contract imports its schemas from the original modules), so the declaring module selects the group. Several or none is none; a member without an endpoint declaration counts as unreadable.

Signature

declare const groupKeysOf: (model: EffectModel, groupId: string, module: string) => Option.Option<GroupKeys>

On this page