@univerjs-procollaborationclassesRevisionservice

@univerjs-pro/collaboration v0.5.4


Class: RevisionService

Defined in: packages/collaboration/src/services/rev/rev.service.ts:25

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

Constructors

new RevisionService()

new RevisionService(_univerInstanceService): RevisionService

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

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService

Returns

RevisionService

Methods

getCurrentRevOfUnit()

getCurrentRevOfUnit(unitId): number

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

Get the current revision of a document.

Parameters

ParameterType
unitIdstring

Returns

number


incrementRevOfUnit()

incrementRevOfUnit(unitId): number

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

Increment the revision number of a document.

Parameters

ParameterType
unitIdstring

Returns

number

The revision number after increment.


setRevOfUnit()

setRevOfUnit(unitId, rev): void

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

Parameters

ParameterType
unitIdstring
revnumber

Returns

void