I am using typescript
with node
. I can write this without any problems:
import * as $ from "jquery";
The definition file for jquery
is in node_modules/@types/jquery
. However, neither of the following works with the definition file for decimal.js
being in node_modules/decimal.js
:
import { Decimal } from "decimal";
import { Decimal } from "decimal.js";
If I however include the file with its absolute path it works like a charm:
import { Decimal } from "/path/to/project/node_modules/decimal.js/decimal";
I'm using the latest version available in npm
and these command line parameters:
--removeComments --inlineSourceMap --inlineSources --allowSyntheticDefaultImports --charset UTF-8 --module amd --target ES6 --newLine LF --moduleResolution classic