mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-15 05:13:23 +00:00
Improve type safety: Replace any with proper types
Replace `candidate: any` with `candidate: RTCIceCandidateInit | null`: Changes: - api.ts poll() return type (line 366) - rondevu.ts pollOffers() return type (line 827) - IceCandidate interface (line 41) Benefits: - Better type safety and IntelliSense support - Matches WebRTC spec (candidates can be null) - Catches potential type errors at compile time - Clearer API contracts for consumers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ export interface Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IceCandidate {
|
export interface IceCandidate {
|
||||||
candidate: RTCIceCandidateInit
|
candidate: RTCIceCandidateInit | null
|
||||||
createdAt: number
|
createdAt: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ export class RondevuAPI {
|
|||||||
iceCandidates: Record<
|
iceCandidates: Record<
|
||||||
string,
|
string,
|
||||||
Array<{
|
Array<{
|
||||||
candidate: any
|
candidate: RTCIceCandidateInit | null
|
||||||
role: 'offerer' | 'answerer'
|
role: 'offerer' | 'answerer'
|
||||||
peerId: string
|
peerId: string
|
||||||
createdAt: number
|
createdAt: number
|
||||||
|
|||||||
@@ -824,7 +824,7 @@ export class Rondevu {
|
|||||||
answeredAt: number
|
answeredAt: number
|
||||||
}>
|
}>
|
||||||
iceCandidates: Record<string, Array<{
|
iceCandidates: Record<string, Array<{
|
||||||
candidate: any
|
candidate: RTCIceCandidateInit | null
|
||||||
role: 'offerer' | 'answerer'
|
role: 'offerer' | 'answerer'
|
||||||
peerId: string
|
peerId: string
|
||||||
createdAt: number
|
createdAt: number
|
||||||
|
|||||||
Reference in New Issue
Block a user