Skip to content

Improve withTrim callback wrappers#13

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

Improve withTrim callback wrappers#13
tinyyyyyyyyyyO wants to merge 1 commit into
bogeeee:mainfrom
tinyyyyyyyyyyO:fix-withtrim-stable-wrapper

Conversation

@tinyyyyyyyyyyO

@tinyyyyyyyyyyO tinyyyyyyyyyyO commented May 20, 2026

Copy link
Copy Markdown

Summary

  • cache withTrim wrappers for identical callback/options so repeated calls return the same function
  • preserve client callback metadata on wrappers so callback registries can add, remove, call, and free them safely
  • add a regression test covering ClientCallbackSet.add(withTrim(cb)) followed by remove(withTrim(cb))

Tests

  • npm run --prefix server dev:fastbuild
  • npx jest --runInBand --testNamePattern="withTrim should return stable wrappers" tests/clientServer/runtime-typechecking.test.js

@opirebot

opirebot Bot commented May 20, 2026

Copy link
Copy Markdown

😅 Ups... the issue does not have any reward yet!

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