@univerjs/core v0.5.0-beta.1 • Docs
Class: abstract
UnitModel<D, T>
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:93 |
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
Returns
void
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:106
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100
getRev()
abstract getRev(): number
Get revision of the unit’s snapshot. Note that revision should start from 1.
Returns
number
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:39
getSnapshot()
abstract getSnapshot(): D
Returns
D
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:36
getUnitId()
abstract getUnitId(): string
Returns
string
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:31
incrementRev()
abstract incrementRev(): void
Increment the current revision.
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:41
setName()
abstract setName(name): void
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:34
setRev()
abstract setRev(rev): void
Set revision of the current snapshot.
Parameters
Parameter | Type |
---|---|
rev | number |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:43