Repository navigation
feat: type the formbricks_debug event for on() - #60
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ebug-event-type # Conflicts: # packages/js/src/types/formbricks.ts
|
Dhruwang
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What & why
Was:
formbricks.on("formbricks_debug", …)does not compile for@formbricks/jsusers. The wrapper's event map lists only the survey events, even thoughon()already forwards any name to the SDK.Now:
formbricks_debugis in the event map with an exportedTFormbricksDebugEventpayload, so wrapper users can subscribe to debug mode's events (formbricks/formbricks#9655).type,at, other keysunknown): its shape may change, so it is for debugging, not for building on.Where to look
packages/js/src/types/formbricks.ts— the new event and its payload type.Coverage
formbricks_debugsubscribes through the wrapper, with its payload typeload-formbricks.test.ts› formbricks_debug passes through to the SDK, with its own payload type. On main it failscheck-types(TS2345, TS2305)Rerun:
pnpm --filter @formbricks/js check-types && pnpm --filter @formbricks/js testThe event only fires against a server with formbricks/formbricks#9655 deployed, and only in debug mode (
?formbricksDebug=true).