effx
API reference@effx/compilerlift

scope

API reference for @effx/compiler/lift/scope

scope.ts overview


Exports Grouped by Category


utils

Scope (interface)

Signature

export interface Scope {
  readonly ctx: Context
  readonly groupId: string
  readonly endpoint: EndpointRecord
  /** `<group>.<key>`, as users write it. */
  readonly subject: string
  readonly key: Option.Option<string>
  /** The analyzed file that holds the endpoint, when the model has a record of it. */
  readonly use: SourceFileRecord | undefined
  readonly causes: Array<Cause>
  readonly refactors: Array<Refactor>
  readonly codeReferences: Array<CodeReference>
}

derivedName

The derived name of an inline export: the group, the endpoint and what the export is.

Signature

declare const derivedName: (scope: Scope, suffix: string) => string

fail

Records a cause with its registered diagnostic.

Signature

declare const fail: (scope: Scope, at: SourceRange, diagnostic: Diagnostic) => void

failFindings

The causes of unlowered findings. At a structural position what names a literal the grammar requires (key, path, options), so an unreadable expression there is the computed-construct cause.

Signature

declare const failFindings: (scope: Scope, position: Position, findings: ReadonlyArray<Finding>, what?: string) => void

failUnrecognized

EFFX3001 for a construct the grammar does not contain.

Signature

declare const failUnrecognized: (scope: Scope, at: SourceRange, construct: string) => void

makeScope

Signature

declare const makeScope: (ctx: Context, groupId: string, endpoint: EndpointRecord) => Scope

nativeOf

The validated native identity of a term, under the model's own target.

Signature

declare const nativeOf: (scope: Scope, term: Term) => NativeCallee | undefined

open

A slot as a cursor, or none after recording the causes of its findings.

Signature

declare const open: (scope: Scope, slot: TermSlot, position: Position, what?: string) => Option.Option<Cursor>

plannedKey

The LiftInput.names key of an endpoint-local planned export.

Signature

declare const plannedKey: (scope: Scope, role: string) => string

On this page