MCPcopy Create free account
hub / github.com/CodinGame/monaco-vscode-api / sequential

Function sequential

demo/src/debugServer.ts:154–169  ·  view source on GitHub ↗
(
  fn: (...params: P) => Promise<T>
)

Source from the content-addressed store, hash-verified

152}
153
154function sequential<T, P extends unknown[]>(
155 fn: (...params: P) => Promise<T>
156): (...params: P) => Promise<T> {
157 let promise = Promise.resolve()
158 return (...params: P) => {
159 const result = promise.then(() => {
160 return fn(...params)
161 })
162
163 promise = result.then(
164 () => {},
165 () => {}
166 )
167 return result
168 }
169}
170
171wss.on('connection', (ws) => {
172 const socket = new DAPSocket((message) => ws.send(message))

Callers 1

debugServer.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…