I have a npm package I publish. It depends on another package, but it's not a peerdepdency.
In my own library, I have
import { parser } from 'peggy';
export type GlslSyntaxError = parser.SyntaxError;
But this doesn't work in a user's install of my parser, because they don't have peggy so Typescript can't resolve the type.
I could hand-copy the type into my file but that is silly. Any suggestions?