Version objects represent individual versions in a draft's version history. Versions are accessed using the versions property of the Draft object.

Example

// loop over versions of a draft, keeping only most recent 3
if (draft.versions.length > 3) {
let versions = draft.versions.slice(3);
for (let version of versions) {
version.delete();
}
}

Hierarchy

  • Version

Constructors

Properties

Methods

Constructors

Properties

content: string

The content of the draft at the time this version was saved

createdAt: Date

Timestamp for the creation of the version

draft?: Draft

The Draft object related to the version. Typically not needed, as versions are accessed through the versions property of a draft.

uuid: string

Unique identifier of this version

Methods

  • Delete the version. This is permanent and should be used with caution

    Returns any

Generated using TypeDoc