joke_types.py 244 Bytes
from typing import TypedDict, Literal


JokeType = Literal["general"] | Literal["knock-knock"] | Literal["programming"] | Literal["dad"] | Literal["any"]


class Joke(TypedDict):
    type: JokeType
    setup: str
    punchline: str
    id: int