I have an NTVS (Node Tools for Visual Studio) project with Typescript.
The following statement doesn't compile:
import debug = require('debug')('MyApp');
The syntax error being
(TS) ';' expected
between the the two parenthesis ')('
Is it possible to use "debug" with TypeScript?
The answers here did not work for me with more recent versions of Typescript. Here's how I got it working with proper import syntax in Typescript
^3.5.3
:Install Debug package and Typescript types for Debug (types only needed for dev)
Then in
.ts
files:Hope this helps someone else!