Interface AnnotationsPlugin<Annotations>

The plugin added to fields by the annotationsPlugin.

interface AnnotationsPlugin<Annotations> {
    annotations: Annotations;
    annotate(patch, options?): void;
    on(eventType, subscriber): Unsubscribe;
}

Type Parameters

  • Annotations extends object

    Annotations associated with fields.

Properties

Methods

Properties

annotations: Annotations

Annotations associated with this field.

Methods

  • Updates annotations of this field.

    Parameters

    • patch: Partial<Annotations> | ((field) => Partial<Annotations>)

      The patch that is applied to current annotations, or a callback that receives the current annotations and returns a patch that must be applied.

    • Optional options: AnnotateOptions

      Additional options.

    Returns void