Skip to main content

API Reference

Structs

LiftAnnotation

Annotations about preflight data and desired inflight operations.

Initializer

let LiftAnnotation = LiftAnnotation{ ... };

Properties

NameTypeDescription
obj
anyPreflight object to lift.
alias
strName of the object in the inflight context.
ops
MutArray<str>Operations to lift on the object.

objRequired
obj: any;
  • Type: any

Preflight object to lift.


aliasOptional
alias: str;
  • Type: str
  • Default: "obj" If the object is a simple identifier, it will be used as the alias

Name of the object in the inflight context.

Required if the object provided is not an identifier.


opsOptional
ops: MutArray<str>;
  • Type: MutArray<str>
  • Default: * All possible operations will be available

Operations to lift on the object.


Protocols

IHostedLiftable

A liftable object that needs to be registered on the host as part of the lifting process.

This is generally used so the host can set up permissions to access the lifted object inflight.

Methods

NameDescription
onLift
A hook called by the Wing compiler once for each inflight host that needs to use this object inflight.

onLift
onLift(host: IInflightHost, ops: MutArray<str>): void

A hook called by the Wing compiler once for each inflight host that needs to use this object inflight.

The list of requested inflight methods needed by the inflight host are given by ops.

Any preflight class can implement this instance method to add permissions, environment variables, or other capabilities to the inflight host when one or more of its methods are called.

hostRequired

opsRequired
  • Type: MutArray<str>