DialogResultCallback: (
    formData: PlainObject,
    action: string,
) => unknown | Promise<unknown>

Result-builder for the generic dialog primitive.

Invoked at the Foundry boundary when a button is pressed. Receives the parsed form data as a plain object (the boundary owns FormDataExtended and the DOM) and the pressed button's action; its return value becomes the dialog's result. This keeps callers in the logic layer free of any Foundry/DOM code.

Type declaration

    • (formData: PlainObject, action: string): unknown | Promise<unknown>
    • Parameters

      • formData: PlainObject
      • action: string

      Returns unknown | Promise<unknown>