Snippetcheck compiles every TypeScript sample in your documentation against the version you actually publish, and tells you which ones no longer work.
We run it against your public docs and email you the broken samples. No account, nothing to install.
Real compiler output. Some inputs are constructed to demonstrate a check the AI SDK docs don't currently trip.
// TS2305: Module "ai" has no exported member 'AssistantResponse'.
import { AssistantResponse } from "ai";// TS2724: Did you mean 'LanguageModelMiddleware'?
import type { LanguageModelV1Middleware } from "ai";// TS2339: Property 'reasoningDetails' does not exist...
console.log(result.reasoningDetails);// TS2551: Did you mean 'pipeTextStreamToResponse'?
result.pipeDataStreamToResponse(res);// TS2353: Object literal may only specify known properties...
embed({ model: "text-embedding-3-small", value: "hello", unrecognizedFlag: true });// TS2554: Expected 1 arguments, but got 0.
createUIMessageStream<MyUIMessage>(/* ... */);.d.ts declarations.<YOUR_API_KEY> placeholders and ... elisions. If it isn't valid syntax, we skip it and count it in the final report tally.