pyright supports defining a TypedDict inline like so:
from __future__ import annotations
from typing import TypedDict
foo: TypedDict[{"bar": str}] = {"bar": "bar"} # errors: F821, UP037
removing the quotes causes the following pyright error:
foo: TypedDict[{bar: str}] = {"bar": "bar"} # error: Expected string literal for dictionary entry name
playground