MCPcopy
hub / github.com/TanStack/router / cleanup

Function cleanup

packages/router-core/src/ssr/transformStreamWithRouter.ts:126–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 let lifetimeTimeoutHandle: ReturnType<typeof setTimeout> | undefined
125
126 const cleanup = () => {
127 if (cleanedUp) return
128 cleanedUp = true
129
130 if (lifetimeTimeoutHandle !== undefined) {
131 clearTimeout(lifetimeTimeoutHandle)
132 lifetimeTimeoutHandle = undefined
133 }
134
135 router.serverSsr?.cleanup()
136 }
137
138 const safeClose = () => {
139 if (isStreamClosed) return

Callers 3

cancelFunction · 0.70
tryFinishFunction · 0.70

Calls 1

cleanupMethod · 0.80

Tested by

no test coverage detected