i am using express with typescript. there i am importing a module
import SomeModuleType from '3rd-party-module';
but since this didn't had type definitions available in npm
src/app.ts:5:21 - error TS7016: Could not find a declaration file for module '3rd-party-module'. 'C:/Work/node_modules/3rd-party-module/dist/index.js' implicitly has an 'any' type. Try 'npm i --save-dev @types/3rd-party-module' if it exists or add a new declaration (.d.ts) file containing 'declare module '3rd-party-module';
5 import SomeModuleType from "3rd-party-module";
so used method given here. the error was gone but, but now the import was unable to find the module definitions from node_modules.
const logger = new SomeModuleType.ContentLogger();
gave error TypeError: Cannot read property 'ContentLogger' of undefined
i tried Go to definition
in vsCode, but that was taking me to the custom index.d.ts file containing
declare module "3rd-party-module";
how to make this run. with proper typescript rules.