Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Type Alias ActiveEffectChangeHandler

    ActiveEffectChangeHandler: (
        targetDoc: documents.Actor | Item | TokenDocument,
        change: ActiveEffectChangeData,
        options?: @param {DataField} [options.field] The field. If not supplied, it will be retrieved from the supplied model. * @param {Record<string, unknown>} [options.replacementData] Data used to resolve "@" expressions. * @param {boolean} [options.modifyTarget] Modify the target Document with the updated value. * ,
    ) => Promise<Record<string, unknown> | void>

    A function that applies the change to a document

    Type Declaration

      • (
            targetDoc: documents.Actor | Item | TokenDocument,
            change: ActiveEffectChangeData,
            options?: @param {DataField} [options.field] The field. If not supplied, it will be retrieved from the supplied model. * @param {Record<string, unknown>} [options.replacementData] Data used to resolve "@" expressions. * @param {boolean} [options.modifyTarget] Modify the target Document with the updated value. * ,
        ): Promise<Record<string, unknown> | void>
      • Parameters

        • targetDoc: documents.Actor | Item | TokenDocument

          The Document requesting the change application

        • change: ActiveEffectChangeData

          The change data

        • Optionaloptions: @param {DataField} [options.field] The field. If not supplied, it will be retrieved from the supplied model. * @param {Record<string, unknown>} [options.replacementData] Data used to resolve "@" expressions. * @param {boolean} [options.modifyTarget] Modify the target Document with the updated value. *

          Additional options to configure the change application.

        Returns Promise<Record<string, unknown> | void>