@univerjs-procollaborationclassesRevisionservice

@univerjs-pro/collaboration v0.5.0-beta.1Docs


Class: RevisionService

This service provide util functions to get revision number of a document or increment the revision number.

Constructors

new RevisionService()

new RevisionService(_univerInstanceService): RevisionService

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService

Returns

RevisionService

Defined in

packages/collaboration/src/services/rev/rev.service.ts:26

Methods

getCurrentRevOfUnit()

getCurrentRevOfUnit(unitId): number

Get the current revision of a document.

Parameters

ParameterType
unitIdstring

Returns

number

Defined in

packages/collaboration/src/services/rev/rev.service.ts:32


incrementRevOfUnit()

incrementRevOfUnit(unitId): number

Increment the revision number of a document.

Parameters

ParameterType
unitIdstring

Returns

number

The revision number after increment.

Defined in

packages/collaboration/src/services/rev/rev.service.ts:44


setRevOfUnit()

setRevOfUnit(unitId, rev): void

Parameters

ParameterType
unitIdstring
revnumber

Returns

void

Defined in

packages/collaboration/src/services/rev/rev.service.ts:52