I want to use PDF.js within my TypeScript Node project using the NPM package pdfjs-dist (version 2.14.305). While pdfjs-dist contains type descriptions, the compiler cannot resolve the types in an specific case.
// type declarations at 'pdfjs-dist/types/src/display/node_utils';
import { NodeCanvasFactory } from 'pdfjs-dist/lib/display/node_utils';
The compiler complains about the types.
TS7016: Could not find a declaration file for module 'pdfjs-dist/lib/display/node_utils'. '[..]/node_modules/pdfjs-dist/lib/display/node_utils.js' implicitly has an 'any' type. If the 'pdfjs-dist' package actually exposes this module, try adding a new declaration (.d.ts) file containing
declare module 'pdfjs-dist/lib/display/node_utils';
How can I tell tsc to take the types from pdfjs-dist/types/src/display/node_utils?