Client
Defined in: procwire-bun-client/src/client.ts:57
Client - Child-side API for Procwire IPC.
This is the Bun.js version; the API is identical to @procwire/client.
Example
Section titled “Example”const client = new Client() .handle('query', async (data, ctx) => { const results = await search(data); ctx.respond(results); }) .handle('insert', async (data, ctx) => { ctx.ack({ accepted: true }); await processInBackground(data); }) .event('progress');
await client.start();
// Emit events to parentclient.emitEvent('progress', { percent: 50 });Extends
Section titled “Extends”SpawnError<S>
Type Parameters
Section titled “Type Parameters”S extends SpawnError = SpawnError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Client<
S>():Client<S>
Returns
Section titled “Returns”Client<S>
Inherited from
Section titled “Inherited from”ClientCore<S>.constructor