Tags: google-gemini/deprecated-generative-ai-js
Tags
Make Schema a discriminated union (#296) * Make Schema a discriminated union This leverages the type system to better describe the API's requirements for schemas. For example, rather than saying that any schema might have an optional `items` property, we're able to express that `items` is required on array schemas and forbidden on all others. More info on discriminated unions: https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions * Update docs.
PreviousNext