Skip to main content

abstractAAnchor <S, T>

The base class of every anchor - a model's public face.

A model is an implementation detail of the library that defines it, and other libraries should not depend on its class. An anchor is what a model exposes instead: a small, named set of properties that other modules match on, using AModel.getAnchorsMatchingSchema. That indirection is what lets a model change without breaking its consumers.

Anchors are also the inputs an AOverlay joins together.

@example
@Anchor('@example')
export class MyAnchor extends AAnchor<MyAnchorSchema, MyModel> { ... }
@group

Overlays

@see

Definition of Anchors.

Implements

  • IAnchor<S, T>

Index

Properties

readonlyanchorId

anchorId: S[anchorId]

The ID of the anchor, unique within its parent.

readonlyproperties

properties: S[properties]

The properties this anchor exposes to whoever matches on it.

staticreadonlyNODE_PACKAGE

NODE_PACKAGE: string

The package of the anchor.

Methods

getParent

  • getParent(): T
  • The model that declared this anchor.


    Returns T