I started a new TypeScript project using npm init and npx tsc --init, then created the following src/index.ts file:
import {Observable, Property} from 'baconjs';
export function add(a$: Observable<number>, b$: Observable<number>): Property<number> {
return a$.combine(b$, (a, b) => a + b);
}
When I attempt to compile using npx tsc -p ., I get the following error:
src/index.ts:1:36 - error TS2307: Cannot find module 'baconjs' or its corresponding type declarations.
1 import {Observable, Property} from 'baconjs';
~~~~~~~~~
I started a new TypeScript project using
npm init
andnpx tsc --init
, then created the following src/index.ts file:When I attempt to compile using
npx tsc -p .
, I get the following error: