79389781

Date: 2025-01-27 05:14:33
Score: 0.5
Natty:
Report link

There might be a way to do it, via Generic Interface.

interface RTCPeerExchange<T extends "offer" | "answer"> {
  from: string;
  type: T;
  data: T extends "offer" ? RTCSessionDescriptionInit : RTCSessionDescriptionInit;
}

Check if this helps.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Rishabh Prabhu