- Add array/async/etc. modules and type tests; migrate to eslint flat config
and composite tsconfig (vitest typecheck enabled).
- Fix PubSub.emit to snapshot listeners before iterating (stable EventEmitter
semantics; avoids invoking listeners added during the same emit).