kopia lustrzana https://github.com/Tldraw/Tldraw
19 wiersze
520 B
TypeScript
19 wiersze
520 B
TypeScript
import { TLIncompatibilityReason } from '@tldraw/tlsync'
|
|
import { Signal, TLStoreSnapshot, TLUserPreferences } from 'tldraw'
|
|
|
|
/** @public */
|
|
export class RemoteSyncError extends Error {
|
|
override name = 'RemoteSyncError'
|
|
constructor(public readonly reason: TLIncompatibilityReason) {
|
|
super(`remote sync error: ${reason}`)
|
|
}
|
|
}
|
|
|
|
/** @public */
|
|
export type UseSyncClientConfig = {
|
|
uri: string
|
|
roomId?: string
|
|
userPreferences?: Signal<TLUserPreferences>
|
|
snapshotForNewRoomRef?: { current: null | TLStoreSnapshot }
|
|
}
|