Skip to main content

Overlay

Callable


  • An @Overlay is a class decorator and must be placed on top of a class representing an overlay.

    • An overlay must also extend the AOverlay class.
    • For type safety, the type of overlay being decorated is passed to the decorator.
    @example
    @Overlay<MyOverlay>('@example', 'my-name', MyOverlaySchema)
    export class MyOverlay extends AOverlay<MyOverlaySchema, MyOverlay> { ... }
    @group

    Decorators

    @see

    Definition of Overlays.


    Type parameters

    • T: UnknownOverlay

    Parameters

    • packageName: string

      The name of the package under which the overlay is registered. Selecting a unique package name helps avoid collisions between same overlay class names across different libraries. You will reuse the same package name throughout your library for different Octo components you create.

    • overlayName: string

      The overlay's name, unique in its package.

    • schema: Constructable<OverlaySchema<T>>

      The schema of the overlay.

    • options: { createsNothing?: boolean } = {}

      Optional settings of the overlay.

      • options.createsNothing - The overlay creates no resources; other nodes only read from it. It declares no action, and each of its diffs is applied by one that does nothing.
      • optionalcreatesNothing: boolean = false

    Returns (constructor: Constructable<T>) => void

    The decorated class.