MCPcopy Create free account
hub / github.com/TanStack/ai / tsString

Function tsString

packages/ai-mcp/src/cli/emit.ts:21–23  ·  view source on GitHub ↗

Escape a value as a TypeScript string literal (handles quotes/newlines).

(value: string)

Source from the content-addressed store, hash-verified

19
20/** Escape a value as a TypeScript string literal (handles quotes/newlines). */
21function tsString(value: string): string {
22 return JSON.stringify(value)
23}
24
25/**
26 * Compile a JSON Schema into a TypeScript type via `json-schema-to-typescript`.

Callers 3

emitDescriptorsFunction · 0.85
emitResourcesFunction · 0.85
emitPromptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected