mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-13 04:13:25 +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 {
|
||||
candidate: RTCIceCandidateInit
|
||||
candidate: RTCIceCandidateInit | null
|
||||
createdAt: number
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ export class RondevuAPI {
|
||||
iceCandidates: Record<
|
||||
string,
|
||||
Array<{
|
||||
candidate: any
|
||||
candidate: RTCIceCandidateInit | null
|
||||
role: 'offerer' | 'answerer'
|
||||
peerId: string
|
||||
createdAt: number
|
||||
|
||||
@@ -824,7 +824,7 @@ export class Rondevu {
|
||||
answeredAt: number
|
||||
}>
|
||||
iceCandidates: Record<string, Array<{
|
||||
candidate: any
|
||||
candidate: RTCIceCandidateInit | null
|
||||
role: 'offerer' | 'answerer'
|
||||
peerId: string
|
||||
createdAt: number
|
||||
|
||||
Reference in New Issue
Block a user