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 meaning(TypedDict): partOfSpeech: str definitions: list[definition]
[docs] class phonetic(TypedDict): text: str audio: str
[docs] class word(TypedDict): word: str phonetic: NotRequired[str] phonetics: list[phonetic] meanings: list[meaning]