Skip to main content
Glama
null.ts603 B
import { Coder } from "./abstract-coder.js"; import type { Reader, Writer } from "./abstract-coder.js"; const Empty = new Uint8Array([ ]); /** * @_ignore */ export class NullCoder extends Coder { constructor(localName: string) { super("null", "", localName, false); } defaultValue(): null { return null; } encode(writer: Writer, value: any): number { if (value != null) { this._throwError("not null", value); } return writer.writeBytes(Empty); } decode(reader: Reader): any { reader.readBytes(0); return null; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExpertVagabond/zetachain-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server