@univerjscoreclassesUnitmodel

@univerjs/core v0.5.4


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 ParameterDefault type
Dobject
T extends UnitTypeUnitType

Constructors

new UnitModel()

new UnitModel<D, T>(): UnitModel<D, T>

Returns

UnitModel<D, T>

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
name$abstractObservable<string>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:33
typeabstractTundefined-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

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


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

ParameterType
namestring

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

ParameterType
revnumber

Returns

void