`dataclasses.asdicttype(type)`

@madduck I think this boils down to first having a way to convert a dataclass-like type to a TypedDict, that can then be used in Unpack[]. I’m not sure the union is the right way to express this. You’d probably need to first create a subclass of One and Two or have a way to create intersection types (in the TypeScript sense).

I’m currently in the process of trying to spec out a way to create TypedDicts dynamically using a comprehension syntax (Inlined typed dicts and typed dict comprehensions - #12 by Viicos). While it is hard to keep the scope limited, such TypedDict comprehensions could be created from a dataclass to express the requested feature here.