@univerjs/core v0.5.0-beta.1 • Docs
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
Parameter | Type |
---|---|
_logService | ILogService |
Returns
Overrides
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:36
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 |
lifecycle$ | readonly | Observable <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
Set Signature
set stage(stage): void
Parameters
Parameter | Type |
---|---|
stage | LifecycleStages |
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
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:57
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
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