Skip to content

API reference / @chanx-js/codegen / emitChannelsDeclaration

Function: emitChannelsDeclaration() ​

ts
function emitChannelsDeclaration(
   connections, 
   messageNames, 
   options
): string;

Defined in: emit-channels.ts:136

The .d.ts companion to a JavaScript channels.js.

Declares the same descriptors with their full generic arguments, so a plain-JS project still gets narrowing, address-param checking and topic typing from its editor.

Parameters ​

ParameterType
connectionsConnectionInfo[]
messageNamesstring[]
optionsChannelEmitOptions

Returns ​

string

MIT licensed