I would like to use a JavaScript library (without type declarations) in a TypeScript project.
I created a declaration file for the library. A declaration, for example, is declare module 'ocsp';.
It's OK when I run the project with a command "npm run build". But, there is a problem to start a project by nodemon "nodemon src/index.ts".
It shows the following error:
error TS7016: Could not find a declaration file for module 'ocsp'. 'D:/Development/Workspace/test-project/node_modules/ocsp/lib/ocsp.js' implicitly has an 'any' type.
Try npm i --save-dev @types/ocsp if it exists or add a new declaration (.d.ts) file containing declare module 'ocsp';
How to start a TypeScript project with a JavaScript library (without type declarations) using nodemon tool?