fix(server-runtime): type issue for crossws Peer
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
import type { Peer } from 'crossws'
|
||||
import type { AuthenticatedPeer } from './types'
|
||||
import type { AuthenticatedPeer, Peer } from './types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel, useLogg } from '@guiiai/logg'
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
import type { Peer } from 'crossws'
|
||||
export interface Peer {
|
||||
/**
|
||||
* Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the peer.
|
||||
*/
|
||||
get id(): string
|
||||
send: (data: unknown, options?: {
|
||||
compress?: boolean
|
||||
}) => number | void | undefined
|
||||
}
|
||||
|
||||
export interface NamedPeer {
|
||||
name: string
|
||||
|
||||
Reference in New Issue
Block a user