TS2554: Expected N arguments, but got M
The function's current signature takes a different number of arguments than the call site provides — a parameter was added, removed, or made required.
Why this happens in documentation specifically
No symbol name is possible in this message by construction — it's about a call, not an identifier — which is why snippetcheck never invents one for it (see the note under "How this shows up" below). In documentation, this shape usually means a function grew or shrank a parameter between versions and every inline call in the docs still uses the old arity.
A real instance found on the live AI SDK docs during verification: `createUIMessageStream<MyUIMessage>(/* ... */)`, flagged as "Expected 1 arguments, but got 0." The argument position holds a bare `/* ... */` elision — a common documentation convention for "fill in real options here" — which genuinely has zero arguments as written. That's a real, current-usage finding, not a false positive from an incomplete snippet; it's flagged in the project's own verification record as worth a caveat for exactly this reason.
A real example
const sim = cosineSimilarity([1, 2], [3, 4], [5, 6]);How to fix it
Check the function's current signature for what argument was added or removed. There's nothing here for TypeScript to guess at — arity mismatches don't come with a suggested fix, only a count.
snippetcheck finds diagnostics like this one across a whole documentation site, not just a single sample — see how it works.