Skip to content

fix(type): add IAlwaysOnTopAPI interface and update references#16995

Open
dipanshurdev wants to merge 1 commit intojitsi:masterfrom
dipanshurdev:dev02
Open

fix(type): add IAlwaysOnTopAPI interface and update references#16995
dipanshurdev wants to merge 1 commit intojitsi:masterfrom
dipanshurdev:dev02

Conversation

@dipanshurdev
Copy link

📝 Description

This PR addresses several TypeScript issues related to the Always-on-Top feature. It introduces a formal interface for the alwaysOnTop API and fixes a type error where window.alwaysOnTop was reported as non-existent by IDEs despite being documented in globals.d.ts.

🚀 Key Improvements

  • Strong Typing: Introduced IAlwaysOnTopAPI in react/features/always-on-top/types.ts.
  • Refined Declarations: Improved Window interface augmentation in globals.d.ts to use the new interface and marked alwaysOnTop as optional for improved runtime safety across different app windows.
  • Improved DX: Resolved the "Property 'alwaysOnTop' does not exist" error commonly seen in IDEs (VS Code).
  • Bug Fix: Fixed setSinkId signature in globals.d.ts to return Promise<void> instead of Promise<undefined>.

✅ Verification Results

  • npm run tsc:web: Passed (verified 0 errors in Always-on-Top components)
  • npm run lint:ci: Passed

🧪 Testing Performed

  • Verified that all calls to api methods in VideoMuteButton, AudioMuteButton, Toolbar, and AlwaysOnTop components now have correct IntelliSense and type checking.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

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.

2 participants