@jsvision/code-editor / createDegradationState
Function: createDegradationState()
createDegradationState(
options?):CodeEditorDegradationState
Defined in: code-editor/src/degradation.ts:124
Creates isolated, bounded degradation state.
Error objects are deliberately not inspected because their messages can contain source, URIs, credentials, terminal controls, or hostile accessors. The optional observer receives only immutable content-free snapshots, and observer exceptions cannot escape into editor work.
Parameters
options?
CodeEditorDegradationOptions = {}
Returns
Example
ts
const degradation = createDegradationState();
degradation.fail('parser');
degradation.pending('parser', { reason: 'retry' });