MCPcopy
hub / github.com/vercel/next.js / onClose

Method onClose

packages/next/src/server/base-http/web.ts:132–139  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

130 }
131
132 public onClose(callback: () => void) {
133 if (this.closeController.isClosed) {
134 throw new InvariantError(
135 'Cannot call onClose on a WebNextResponse that is already closed'
136 )
137 }
138 return this.closeController.onClose(callback)
139 }
140}

Callers 4

web.test.tsFile · 0.45
renderToHTMLOrFlightImplFunction · 0.45
runCallbacksOnCloseMethod · 0.45
n3Function · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected