Summary
finish() closure in extensions/feishu/src/async.ts:79 references timer, but timer is declared as const after finish is defined. If finish(false) fires via the abort signal at line 99-100 before const timer on line 103 executes, accessing timer in the temporal dead zone throws ReferenceError.
Reproduction
Source inspection: guaranteed TDZ violation path at lines 79-103. Currently guarded by the outer abortSignal?.aborted check, but fragile.
Expected
Hoist timer as let above finish so it is safely undefined when finish fires early.
Scope
extensions/feishu/src/async.ts:77-107 — 1 file, ~1 LoC change.
Summary
finish()closure inextensions/feishu/src/async.ts:79referencestimer, buttimeris declared asconstafterfinishis defined. Iffinish(false)fires via the abort signal at line 99-100 beforeconst timeron line 103 executes, accessingtimerin the temporal dead zone throwsReferenceError.Reproduction
Source inspection: guaranteed TDZ violation path at lines 79-103. Currently guarded by the outer
abortSignal?.abortedcheck, but fragile.Expected
Hoist
timerasletabovefinishso it is safelyundefinedwhen finish fires early.Scope
extensions/feishu/src/async.ts:77-107— 1 file, ~1 LoC change.