forked from Shiloh/remnantchat
feat: genericize makeAction
This commit is contained in:
parent
638587f5a3
commit
4eb1d05b92
8
src/react-app-env.d.ts
vendored
8
src/react-app-env.d.ts
vendored
@ -25,20 +25,18 @@ declare module 'trystero' {
|
||||
export type RoomConfig = BaseRoomConfig &
|
||||
(BitTorrentRoomConfig | FirebaseRoomConfig | IpfsRoomConfig)
|
||||
|
||||
export type PeerActionData = any
|
||||
|
||||
export interface Room {
|
||||
makeAction: (
|
||||
makeAction: <T>(
|
||||
namespace: string
|
||||
) => [
|
||||
(
|
||||
data: PeerActionData,
|
||||
data: T,
|
||||
targetPeers?: string[],
|
||||
metadata?: Record,
|
||||
progress: (percent: number, peerId: string) => void
|
||||
) => void,
|
||||
|
||||
(data: PeerActionData, peerId: string, metadata?: Record) => void,
|
||||
(data: T, peerId: string, metadata?: Record) => void,
|
||||
|
||||
(percent: number, peerId: string, metadata?: Record) => void
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user