Class: abstract
UnitModel<D, T>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:28
The base class for all units.
Extends
Extended by
Type Parameters
Type Parameter | Default type |
---|---|
D | object |
T extends UnitType | UnitType |
Constructors
new UnitModel()
new UnitModel<D, T>(): UnitModel<D, T>
Returns
UnitModel
<D
, T
>
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
name$ | abstract | Observable <string > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:33 |
type | abstract | T | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:29 |
Methods
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
getRev()
abstract getRev(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:39
Get revision of the unit’s snapshot. Note that revision should start from 1.
Returns
number
getSnapshot()
abstract getSnapshot(): D
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:36
Returns
D
getUnitId()
abstract getUnitId(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:31
Returns
string
incrementRev()
abstract incrementRev(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:41
Increment the current revision.
Returns
void
setName()
abstract setName(name): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:34
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
setRev()
abstract setRev(rev): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:43
Set revision of the current snapshot.
Parameters
Parameter | Type |
---|---|
rev | number |
Returns
void