We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Using version 0.26.0
A class like the following:
class Animal(BaseModel): type: Literal["dog"] = "dog" name: string
Should generate a typescript class like so:
export type Animal = { type: "dog" name: string }
But it generates
export type Animal = { type?: any name: string }