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