effx
API reference@effx/compilerlift

inline-export

API reference for @effx/compiler/lift/inline-export

inline-export.ts overview


Exports Grouped by Category


utils

InlineExport (interface)

One inline expression of an endpoint that a refactor exports under a planned name.

Signature

export interface InlineExport {
  /** The expression being replaced. */
  readonly cursor: Cursor
  readonly role: Extract<
    PlannedExport["role"],
    "params" | "query" | "headers" | "payload" | "success" | "responseHeaders"
  >
  readonly code: "EFFX3002" | "EFFX3003"
  /** The registered diagnostic explaining the refactor, given the planned name. */
  readonly describe: (planned: string) => Diagnostic
  /** What the new export holds. */
  readonly initializer: Term
  /** The deterministic name used when `LiftInput.names` pins none. */
  readonly derived: string
}

exportInline

Plans the export for an inline expression of the endpoint and records its refactor. The result is the REAL SchemaRef the suggestion then uses; when the plan cannot be made (an unusable pin, no file record) the cause is recorded and the result is none, so no placeholder reference ever exists.

Signature

declare const exportInline: (scope: Scope, request: InlineExport) => Option.Option<SchemaRef>

On this page