Worked for me, but unfortunately I also had to create a wrapper framework target in my project— my app project embeds and imports the wrapper (e.g. TwiftWrapper framework), and the wrapper embeds and imports the original lib (e.g. Twift framework) and has a single file with typealiases to prefixed names (e.g. public typealias TwiftUser = User).
The reason why a single file in the app target didn't work was because my app and the offending library (Twift: GitHub - daneden/Twift: 🐦 An async Swift library for the Twitter v2 API 🚧 WIP) both declare User types, so Swift thinks I'm instantiating MyProject::User when I want Twift::User, and of course, typing Twift.User is interpreted as a non-existent Twift::Twift.User type.
TL;DR Lack of ability to resolve types specifically to a module can lead to nasty “namespace” pollution, not easily solved by a single separate typealias(es) source file.