Source code for word2anki.type
"""Word type define
"""
from typing import TypedDict, Optional,NotRequired
[docs]
class definition(TypedDict):
definition: str
example: NotRequired[str]
synonyms: list[str]
antonyms: list[str]
[docs]
class word(TypedDict):
word: str
phonetic: NotRequired[str]
phonetics: list[phonetic]
meanings: list[meaning]