MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / next

Method next

restored-src/src/utils/stream.ts:19–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 }
18
19 next(): Promise<IteratorResult<T, unknown>> {
20 if (this.queue.length > 0) {
21 return Promise.resolve({
22 done: false,
23 value: this.queue.shift()!,
24 })
25 }
26 if (this.isDone) {
27 return Promise.resolve({ done: true, value: undefined })
28 }
29 if (this.hasError) {
30 return Promise.reject(this.hasError)
31 }
32 return new Promise<IteratorResult<T>>((resolve, reject) => {
33 this.readResolve = resolve
34 this.readReject = reject
35 })
36 }
37
38 enqueue(value: T): void {
39 if (this.readResolve) {

Callers 15

callFunction · 0.45
callFunction · 0.45
callFunction · 0.45
cachedLexerFunction · 0.45
cachedHighlightFunction · 0.45
evictOldestIfAtCapFunction · 0.45
normalizeMessageFunction · 0.45
returnValueFunction · 0.45
nextFunction · 0.45
firstGraphemeFunction · 0.45
readFileMethod · 0.45

Calls 3

resolveMethod · 0.45
shiftMethod · 0.45
rejectMethod · 0.45

Tested by

no test coverage detected