Skip to content

refactor: improve withTrim identity stability, caching, listener removal, and fix ReceivedChannelItems free payload id bug (#8)#17

Open
simpgps wants to merge 1 commit into
bogeeee:mainfrom
simpgps:fix-withtrim-stable-wrapper
Open

refactor: improve withTrim identity stability, caching, listener removal, and fix ReceivedChannelItems free payload id bug (#8)#17
simpgps wants to merge 1 commit into
bogeeee:mainfrom
simpgps:fix-withtrim-stable-wrapper

Conversation

@simpgps

@simpgps simpgps commented Jun 10, 2026

Copy link
Copy Markdown

This PR improves withTrim callback wrappers to resolve issue #8.

Features:

  • Caches withTrim wrappers for identical callback/options so repeated calls return the same function.
  • Preserves client callback metadata on wrappers so callback registries can add, remove, call, and free them safely.
  • Optimizes ClientCallbackSet.remove to support removing via either wrapper reference or the original callback.
  • Fixes payload ID bug in ReceivedChannelItems 'free' operation.
  • Adds comprehensive regression tests in runtime-typechecking.test.ts covering withTrim wrapper stability, callback sets, and cleanup logic.

…val, and fix ReceivedChannelItems free payload id bug (bogeeee#8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant