NitroSQLite
nitro-sqliteInterfaces

ReadCancellationSignal

TypeScript

Source files: TypeScript

The part of a standard AbortSignal used to cancel a read. Browser, React Native, and Node AbortController.signal values satisfy this interface. Standalone consumers do not need DOM or Node global type declarations.

Properties

aborted

readonly aborted: boolean

Defined in: packages/nitro-sqlite/src/types.ts:188

Whether cancellation was requested before or during this read.


reason?

readonly optional reason?: unknown

Defined in: packages/nitro-sqlite/src/types.ts:190

Original cancellation reason, preserved as the rejected SQLiteError's cause.

Methods

addEventListener()

addEventListener(type, listener, options?): void

Defined in: packages/nitro-sqlite/src/types.ts:196

Subscribe to cancellation for the lifetime of this read.

Parameters

type

"abort"

The abort event.

listener

() => void

Callback invoked when cancellation is requested.

options?

Use once to remove the listener after its first call.

once?

boolean

Returns

void


removeEventListener()

removeEventListener(type, listener): void

Defined in: packages/nitro-sqlite/src/types.ts:205

Unsubscribe when the read settles.

Parameters

type

"abort"

The abort event.

listener

() => void

Previously registered callback.

Returns

void

On this page