In node.js I'm using jsreport-core
and they do their import like var jsreport = require('jsreport-core')();
with the trailing ()
. I'm curious what is the best way to replicate this import technique is in TypeScript?
Asked
Active
Viewed 3,448 times
6

Zeeshan Hassan Memon
- 8,105
- 4
- 43
- 57

Jason Leach
- 3,889
- 7
- 37
- 54
2 Answers
8
I'm curious what the best way to replicate this import technique is in TypeScript
You need to split the import
and the function call:
import jsreportCreator = require('jsreport-core');
const jsreport = jsreportCreator();

basarat
- 261,912
- 58
- 460
- 511