Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/earthstar/src/replica/replica.ts>Replica#addAttachments

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
method Replica.prototype.addAttachments
import { Replica } from "https://deno.land/x/earthstar@v10.0.0-alpha.2/src/replica/replica.ts";

Returns the given array of documents with a new attachment property merged in. The value of this property can be:

  • DocAttachment
  • undefined (the associated document can have an attachment, but we don't have a copy)
  • ValidationError (the associated document can't have an attachment)

Parameters

docs: FormatDocType<F>[]
optional
formats: FormatsArg<F>