@univerjscoreclassesLifecycleservice

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


Class: LifecycleService

This service controls the lifecycle of a Univer instance. Other modules can inject this service to read the current lifecycle stage or subscribe to lifecycle changes.

Extends

Constructors

new LifecycleService()

new LifecycleService(_logService): LifecycleService

Parameters

ParameterType
_logServiceILogService

Returns

LifecycleService

Overrides

Disposable.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:36

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
lifecycle$readonlyObservable<LifecycleStages>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:32

Accessors

stage

Get Signature

get stage(): LifecycleStages
Returns

LifecycleStages

Set Signature

set stage(stage): void
Parameters
ParameterType
stageLifecycleStages
Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:42

Methods

dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:57


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


subscribeWithPrevious()

subscribeWithPrevious(): Observable<LifecycleStages>

Subscribe to lifecycle changes and all previous stages and the current stage will be emitted immediately.

Returns

Observable<LifecycleStages>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:67