On Wed, 2022-10-19 at 10:13 -0700, Jelle Zijlstra wrote:

[snip]

if TYPE_CHECKING:
    TD = dict[str, Any]
else:
    TD = TypedDict("TD", {k: v for ...}))

Thanks, I'll use this pattern in these cases.