Extract the duplicated loop pattern (create context, iterate extensions, iterate handlers, try/catch, emitError) into a private invokeHandlers() helper. Each emit method is now a thin wrapper that delegates the iteration to invokeHandlers and provides only its result-processing callback. Net reduction of ~124 lines with identical runtime behavior. |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||