/** * Define a type-safe server from a record of commands. * * The returned function accepts a standard `Request`, decodes its body as a * UCAN {@link Invocation}, validates the args against the matching command's * schema, and dispatches to the corresponding handler in `options.handlers`. * The handler's return value is serialized to JSON. * * @template {CommandsRecord} Commands * @param {Commands} commands * @param {DefineServerOptions} options * @returns {ServerRequestHandler} */ export function defineServer(commands: Commands, options: DefineServerOptions): ServerRequestHandler; import type { CommandsRecord } from './types.js'; import type { DefineServerOptions } from './types.js'; import type { ServerRequestHandler } from './types.js'; //# sourceMappingURL=server.d.ts.map