Skip to content
Source
Sign inSign up
TanStack/devtools
Open History to see the last commit

server.ts

11 lines300 Bytes

1import { EventClient } from '@tanstack/devtools-event-client'
2​
3const serverProbeClient = new EventClient<{
4 'server-ping': { id: number; from: string }
5}>({
6 pluginId: 'event-probe',
7})
8​
9export function emitServerPing(id: number) {
10 serverProbeClient.emit('server-ping', { id, from: 'server' })