MCPcopy
hub / github.com/supermacro/neverthrow / [Symbol.asyncIterator]

Method [Symbol.asyncIterator]

src/result-async.ts:234–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232 }
233
234 async *[Symbol.asyncIterator](): AsyncGenerator<Err<never, E>, T> {
235 const result = await this._promise
236
237 if (result.isErr()) {
238 // @ts-expect-error -- This is structurally equivalent and safe
239 yield errAsync(result.error)
240 }
241
242 // @ts-expect-error -- This is structurally equivalent and safe
243 return result.value
244 }
245}
246
247export function okAsync<T, E = never>(value: T): ResultAsync<T, E>

Callers

nothing calls this directly

Calls 2

errAsyncFunction · 0.85
isErrMethod · 0.65

Tested by

no test coverage detected