Expression type

An opaque deploy-time expression wrapping type T.

For object types, properties of T are accessible as Expression<Exclude<T[K], undefined>>. Expression proxies always expose a symbolic property path, so TypeScript's undefined omission marker does not belong in the projected value type. Explicit null remains intact. For array types, numeric indices return Expression<element> and .length is an Expression<number>.

Function-typed keys on T are intentionally NOT surfaced — an Expression<(...)=>R> isn't callable at the type level or meaningful at emit time. When bicep-level array/object methods are needed (concat, union, etc.), they are added explicitly via dedicated helper types (e.g. a future ArrayExpression<T>), not reflectively derived.

NonNullable<T> is applied at the input boundary, so Expression<R | undefined> yields the same structural surface as Expression<R> — otherwise the | undefined union would distribute and collapse the object branch into mapped | {}, erasing the index signature / member projection.

type Expression<T> = ExpressionBrand<T> &
  ExpressionTag &
  ExpressionShape<NonNullable<T>>