DryResourceCallback: ((resource: Resource, isRootDocument: boolean) => void | Promise<void>)

Type declaration

    • (resource: Resource, isRootDocument: boolean): void | Promise<void>
    • Transformations to apply on the document and each subresource.

      To also perform the default transformations, make this callback run resource.dry().

      Can be defined via the dryResource option.

      Parameters

      • resource: Resource

        The resource to be ‘dried’.

      • isRootDocument: boolean

        Whether resource is the top-level document (rather than a subresource).

      Returns void | Promise<void>