Skip to content

Commit 9713dc1

Browse files
committed
fix(cloud-agent-next): suppress prefer-const lint for late-bound lifecycleManager
1 parent 1cd0ceb commit 9713dc1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • cloud-agent-next/wrapper/src

cloud-agent-next/wrapper/src/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,10 @@ async function main() {
207207
// ---------------------------------------------------------------------------
208208
const state = new WrapperState();
209209

210-
// Late-bound: assigned after connectionManager is created (which the lifecycle
211-
// callbacks need to reference). All callback closures below that use this
212-
// variable are only invoked at runtime, well after assignment.
210+
// Late-bound: assigned after connectionManager is created (the lifecycle
211+
// callbacks below capture this variable by reference and only read it at
212+
// runtime, well after the assignment on the next line after createConnectionManager).
213+
// eslint-disable-next-line prefer-const
213214
let lifecycleManager: ReturnType<typeof createLifecycleManager> | undefined;
214215

215216
// Create connection manager

0 commit comments

Comments
 (0)