API Reference
@univerjs
@univerjs/core
classes
Contextservice

@univerjs/core v0.4.2Docs


Class: ContextService

Extends

Implements

Constructors

new ContextService()

new ContextService(): ContextService

Returns

ContextService

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
contextChanged$readonlyObservable<{}>undefined-submodules/univer/packages/core/src/services/context/context.service.ts:35 (opens in a new tab)

Methods

dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

submodules/univer/packages/core/src/services/context/context.service.ts:39 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


getContextValue()

getContextValue(key): boolean

Parameters

ParameterType
keystring

Returns

boolean

Implementation of

IContextService.getContextValue

Defined in

submodules/univer/packages/core/src/services/context/context.service.ts:44 (opens in a new tab)


setContextValue()

setContextValue(key, value): void

Parameters

ParameterType
keystring
valueboolean

Returns

void

Implementation of

IContextService.setContextValue

Defined in

submodules/univer/packages/core/src/services/context/context.service.ts:48 (opens in a new tab)


subscribeContextValue$()

subscribeContextValue$(key): Observable<boolean>

Parameters

ParameterType
keystring

Returns

Observable<boolean>

Implementation of

IContextService.subscribeContextValue$

Defined in

submodules/univer/packages/core/src/services/context/context.service.ts:53 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.