Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/js/lib/src/integrations/sourcepoint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { installSourcepointGuard } from './script_guard';
type SourcepointWindow = Window & {
__tsjs_sourcepoint?: {
rewriteSdk?: boolean;
debugForceBannerVisible?: boolean;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 note — These two fields are added to the SourcepointWindow type and the Rust config script now serializes both into window.__tsjs_sourcepoint, but no TS code reads them — the only consumer (shouldInstallSourcepointGuard) reads rewriteSdk only. Both debug behaviors are implemented entirely by the Rust-injected inline scripts. Keeping the type in sync with the emitted JSON is defensible as documentation; flagging so it's a conscious choice rather than a leftover from a planned-but-unwired TS consumer.

debugClearStateOnLoad?: boolean;
Comment on lines +8 to +9

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 thinkingdebugForceBannerVisible and debugClearStateOnLoad are added to the __tsjs_sourcepoint window type, but no TypeScript reads them — the entire debug behavior is implemented by the Rust-injected inline scripts. That's fine as config-shape documentation, but worth confirming it's intentional rather than a half-wired feature (e.g. behavior that was meant to live in script_guard.ts but ended up Rust-side). If they're purely documentation, a short comment saying so would prevent a future reader from assuming the TS layer consumes them.

};
};

Expand Down
Loading
Loading