@univerjscoreclassesUnitmodel

@univerjs/core v0.5.0-beta.1Docs


Class: abstract UnitModel<D, T>

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:93
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

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

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

ParameterType
namestring

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

ParameterType
revnumber

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/unit.ts:43