@univerjs-pro/collaboration v0.5.0-beta.1 • Docs
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
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
Returns
Defined in
packages/collaboration/src/services/rev/rev.service.ts:26
Methods
getCurrentRevOfUnit()
getCurrentRevOfUnit(unitId): number
Get the current revision of a document.
Parameters
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
unitId | string |
Returns
number
The revision number after increment.
Defined in
packages/collaboration/src/services/rev/rev.service.ts:44
setRevOfUnit()
setRevOfUnit(unitId, rev): void
Parameters
Parameter | Type |
---|---|
unitId | string |
rev | number |
Returns
void
Defined in
packages/collaboration/src/services/rev/rev.service.ts:52