-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Select which package(s) are affected
@livekit/components-react
Describe the bug
Hi @1egoman @lukasIO @thomasyuill-livekit ! It looks like there is a mismatch between the runtime implementation and the published TypeScript types for useIsMuted in @livekit/components-react. The actual implementation supports the following overload:
useIsMuted(source: Track.Source, options: { participant: Participant })
However, the public type definitions only expose:
useIsMuted(trackRef: TrackReferenceOrPlaceholder): boolean;
This results in a TypeScript error when using the second, documented usage pattern:
TS2554: Expected 1 arguments, but got 2
Reproduction
import { useIsMuted } from '@livekit/components-react';
import { Track } from 'livekit-client';
const isMuted = useIsMuted(Track.Source.Camera, { participant, });
This works at runtime but fails TypeScript type checking.
Logs
System Info
Environment
@livekit/components-react: "^2.9.19"
TypeScript: "~5.9.3"Severity
blocking all usage of LiveKit
Additional Information
Expected Behavior
Either:
The public .d.ts file should include the second overload, or
The documentation/examples should only reference the trackRef-based usage.