TS2353: Object literal may only specify known properties
You passed an object literal directly to something expecting a specific type, and TypeScript's excess-property check caught a key on your object that isn't part of that type at all.
Why this happens in documentation specifically
This fires specifically for object literals passed inline — `fn({ ...})` — which is exactly how most documentation examples pass options, since it's the most readable form on the page. When an option is renamed or dropped between versions, every inline example using it breaks this way.
A real example
const result = await embed({ model: "text-embedding-3-small", value: "hi", unrecognizedFlag: true });How to fix it
Check the function's current parameter type for the real option name. No suggestion here means TypeScript didn't find a close-enough match on the type — the option may be gone outright, moved into a nested object, or renamed to something not textually similar.
If you assign the same object to a variable typed loosely (or untyped) first and pass the variable instead, TypeScript's excess-property check doesn't run — which hides this exact class of bug rather than fixing it. Worth knowing if you're wondering why a colleague's equivalent code doesn't show the error.
Related codes
snippetcheck finds diagnostics like this one across a whole documentation site, not just a single sample — see how it works.