forked from Shiloh/remnantchat
chore: define RoomConfig type
This commit is contained in:
parent
a86e2d6592
commit
638587f5a3
23
src/react-app-env.d.ts
vendored
23
src/react-app-env.d.ts
vendored
@ -2,7 +2,28 @@
|
|||||||
|
|
||||||
// TODO: Contribute this to DefinitelyTyped
|
// TODO: Contribute this to DefinitelyTyped
|
||||||
declare module 'trystero' {
|
declare module 'trystero' {
|
||||||
export interface RoomConfig {}
|
interface BitTorrentRoomConfig {
|
||||||
|
trackerUrls?: string[]
|
||||||
|
trackerRedundancy?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FirebaseRoomConfig {
|
||||||
|
firebaseApp?: string
|
||||||
|
rootPath?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IpfsRoomConfig {
|
||||||
|
swarmAddresses?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BaseRoomConfig {
|
||||||
|
appId: string
|
||||||
|
password?: string
|
||||||
|
rtcConfig?: RTCConfiguration
|
||||||
|
}
|
||||||
|
|
||||||
|
export type RoomConfig = BaseRoomConfig &
|
||||||
|
(BitTorrentRoomConfig | FirebaseRoomConfig | IpfsRoomConfig)
|
||||||
|
|
||||||
export type PeerActionData = any
|
export type PeerActionData = any
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user