I am trying to use the type definitions in the callbag library. This library declares its type definition file in its package.json. It is not uploaded to DefinitelyTyped. When I try to import the library, I get the error:
Cannot find module 'callbag'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
This is how I import it:
import type { Sink } from 'callbag';
Here is my tsconfig.json
:
{
"compilerOptions": {
"module": "es6",
"noEmitOnError": true,
"outDir": "./dist",
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es5"
},
"include": ["./src/**/*"]
}
I also tried adding "types": ["callbag"]
to the tsconfig.json, but it didn't work.
How do I get typescript to recognize the types for this library?