Skip to content

Commit

Permalink
Fix sendOnConnect types
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Sep 4, 2024
1 parent 6ac0e8b commit c2d3721
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion base-server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ interface ChannelOptions {
interface ConnectLoader<Headers extends object = {}> {
(ctx: ConnectContext<Headers>, lastSynced: number):
| [Action, ServerMeta][]
| Promise<[Action, ServerMeta][]>
| Promise<
[
Action,
Partial<Pick<ServerMeta, 'subprotocol'>> &
Pick<ServerMeta, 'id' | 'time'>
][]
>
}

type ServerNodeConstructor = new (...args: any[]) => ServerNode
Expand Down

0 comments on commit c2d3721

Please sign in to comment.