Ive tested 4.0.189 from NPM and noticed that the type declaration file is broken for legacy with this version. 

> Error:
> Could not find a declaration file for module 'pdfjs-dist/legacy/build/pdf.mjs'

The fix is simple. `pdfjs-dist/legacy/build/pdf.d.ts` should be renamed to `pdfjs-dist/legacy/build/pdf.mjs.d.ts`.
export * from "../types/web/pdf_viewer.component";