MCPcopy Create free account
hub / github.com/middleapi/orpc / isAsyncIteratorObject

Function isAsyncIteratorObject

packages/shared/src/iterator.ts:6–12  ·  view source on GitHub ↗
(maybe: unknown)

Source from the content-addressed store, hash-verified

4import { AsyncIdQueue } from './queue'
5
6export function isAsyncIteratorObject(maybe: unknown): maybe is AsyncIteratorObject<any, any, any> {
7 if (!maybe || typeof maybe !== 'object') {
8 return false
9 }
10
11 return 'next' in maybe && typeof maybe.next === 'function' && Symbol.asyncIterator in maybe && typeof maybe[Symbol.asyncIterator] === 'function'
12}
13
14export interface AsyncIteratorClassNextFn<T, TReturn> {
15 (): Promise<IteratorResult<T, TReturn>>

Callers 15

serializeMethod · 0.90
deserializeMethod · 0.90
callMethod · 0.90
encodeMethod · 0.90
initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
toFetchBodyFunction · 0.90
fetchFunction · 0.90
toNodeHttpBodyFunction · 0.90
event-source.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected