Interface AnnotationsPlugin<Annotations>

The plugin added to fields by the annotationsPlugin.

interface AnnotationsPlugin<Annotations> {
    annotations: Annotations;
    annotate(patch: Partial<Annotations> | ((field: any) => Partial<Annotations>), options?: AnnotateOptions): void;
    on(eventType: "change:annotations", subscriber: Subscriber<Annotations, any>): 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: any) => 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.

    • Optionaloptions: AnnotateOptions

      Additional options.

    Returns void