Skip to main content

Interface: State

libs/common/ide/types/State.State

A state represents a storage utility. It can store and retrieve values.

Implemented by

Methods

get

get<K>(key): { hideInferenceWarning: boolean = false }[K]

Return a value.

Type parameters

NameType
Kextends "hideInferenceWarning"

Parameters

NameTypeDescription
keyKA string.

Returns

{ hideInferenceWarning: boolean = false }[K]

The stored value or the defaultValue.

Defined in

libs/common/ide/types/State.ts:21


set

set<K>(key, value): Thenable<void>

Store a value. The value must be JSON-stringifyable.

Type parameters

NameType
Kextends "hideInferenceWarning"

Parameters

NameTypeDescription
keyKA string.
value{ hideInferenceWarning: boolean = false }[K]A value. MUST not contain cyclic references.

Returns

Thenable<void>

Defined in

libs/common/ide/types/State.ts:29