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
Name | Type |
---|---|
K | extends "hideInferenceWarning" |
Parameters
Name | Type | Description |
---|---|---|
key | K | A 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
Name | Type |
---|---|
K | extends "hideInferenceWarning" |
Parameters
Name | Type | Description |
---|---|---|
key | K | A 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