abortLogger
const abortLogger: { get enabled(): boolean; keystrokeAborted: void; keystrokeCreated: void; keystrokeSignalCleared: void; keystrokeSignalSet: void; localControllerCreated: void; signalLinked: void; signalUnlinked: void; staleDataDiscarded: void;};Defined in: packages/engine/src/utilities/AbortControllerLogger.ts:37
Records abort-signal lifecycle for debugging cancellation.
Keystroke cancellation is hard to reason about after the fact, because the evidence is gone by the time anything looks wrong. This keeps it.
Type Declaration
Section titled “Type Declaration”enabled
Section titled “enabled”Get Signature
Section titled “Get Signature”get enabled(): boolean;Whether debug logging is currently active.
Returns
Section titled “Returns”boolean
keystrokeAborted()
Section titled “keystrokeAborted()”keystrokeAborted(reason): void;Log abortion of the keystroke-level AbortController.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
reason | string | Why the keystroke was aborted (e.g. “New keystroke”, “Document switch”, “Plugin destroyed”). |
Returns
Section titled “Returns”void
keystrokeCreated()
Section titled “keystrokeCreated()”keystrokeCreated(): void;Log creation of the keystroke-level AbortController. Called in the plugin constructor and on each new keystroke.
Returns
Section titled “Returns”void
keystrokeSignalCleared()
Section titled “keystrokeSignalCleared()”keystrokeSignalCleared(): void;Log that the keystroke signal was CLEARED from the engine (typically in the evaluator’s finally block).
Returns
Section titled “Returns”void
keystrokeSignalSet()
Section titled “keystrokeSignalSet()”keystrokeSignalSet(isAborted): void;Log that the keystroke signal was propagated INTO the engine.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
isAborted | boolean | Whether the signal was already aborted when set. |
Returns
Section titled “Returns”void
localControllerCreated()
Section titled “localControllerCreated()”localControllerCreated(source): void;Log creation of a local AbortController that is linked to the keystroke signal.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
source | string | Which code path created the controller (e.g. “executeAndStore”, “executeRaw”, “preflight”, “vm”). |
Returns
Section titled “Returns”void
signalLinked()
Section titled “signalLinked()”signalLinked(source): void;Log that a local AbortController was linked to the keystroke signal. When the keystroke signal is aborted, this local controller will be aborted automatically.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
source | string | The code path that created the controller. |
Returns
Section titled “Returns”void
signalUnlinked()
Section titled “signalUnlinked()”signalUnlinked(source): void;Log that a local AbortController’s listener was removed from the keystroke signal (cleanup).
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
source | string | The code path. |
Returns
Section titled “Returns”void
staleDataDiscarded()
Section titled “staleDataDiscarded()”staleDataDiscarded(queryKey, context): void;Log that a stale async result was discarded because its signal was aborted.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
queryKey | string | The cache key for the discarded result. |
context | string | Additional context (e.g. “after await”, “after error”). |
Returns
Section titled “Returns”void