Skip to main content
Glama
index.test-d.ts914 B
import { expectType, expectAssignable } from "tsd"; import slowRedact from "."; import type { redactFn, redactFnNoSerialize } from "."; // should return redactFn expectType<redactFn>(slowRedact()); expectType<redactFn>(slowRedact({ paths: [] })); expectType<redactFn>(slowRedact({ paths: ["some.path"] })); expectType<redactFn>(slowRedact({ paths: [], censor: "[REDACTED]" })); expectType<redactFn>(slowRedact({ paths: [], strict: true })); expectType<redactFn>(slowRedact({ paths: [], serialize: JSON.stringify })); expectType<redactFn>(slowRedact({ paths: [], serialize: true })); expectType<redactFnNoSerialize>(slowRedact({ paths: [], serialize: false })); expectType<redactFn>(slowRedact({ paths: [], remove: true })); // should return string expectType<string>(slowRedact()("")); // should return string or T expectAssignable<string | { someField: string }>( slowRedact()({ someField: "someValue" }) );

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/krtw00/search-mcp'

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