Skip to content

TailHandle

Defined in: src/core/adapters.ts:163

Handle to a tail operation

Implements AsyncDisposable for use with await using.

Example

// Traditional usage
const handle = adapter.tailStreaming('/path/to/file');
try {
for await (const line of handle.lines) { console.log(line); }
} finally {
handle.stop();
}
// With await using (recommended)
await using handle = adapter.tailStreaming('/path/to/file');
for await (const line of handle.lines) { console.log(line); }
// Automatically stopped when scope exits

Extends

  • AsyncDisposable

Properties

lines

readonly lines: AsyncIterable<string>

Defined in: src/core/adapters.ts:165

Async iterator for new lines

Methods

[asyncDispose]()

Call Signature

[asyncDispose](): PromiseLike<void>

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts:40

Returns

PromiseLike<void>

Inherited from

AsyncDisposable.[asyncDispose]

Call Signature

[asyncDispose](): PromiseLike<void>

Defined in: node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/compatibility/disposable.d.ts:13

Returns

PromiseLike<void>

Inherited from

AsyncDisposable.[asyncDispose]


stop()

stop(): void

Defined in: src/core/adapters.ts:167

Stop tailing

Returns

void