Okay, I run into this a lot. At least since PNPM.
Here's at least one thing that's worked for me:
Whatever the non-portable type is that it's complaining about (something imported from another library and re-exported)...
- Create a named type alias for that type in the module
- Export that type alias
- Explicit cast the thing to that type alias
So
import { type Thing as LibThing, createThing } from 'a-library';
export type MyThing = LibThing;
export const myThing = createThing() as MyThing;My understanding is you just need some concrete location for the relevant type to be referenced from that's exported from your own module.