I am trying to import a Node module in the most correct way possible. I would like the line:
import * as pg from "pg"
to work. But right now it raises a:
Cannot find module 'pg' error
.
I'm hoping I am missing something simple.
My failing strategy:
npm install pg --save
typings install pg --save
"files": [ "./typings/index.d.ts",
in tsconfig.json.
Let me know if you have any advice for my approach.