I'm running TypeScript 2.0.3, configured to with "target": "es2015",
. I started with
/// <reference path="../../node_modules/@types/node/index.d.ts" />
import assert = require('assert');
But in Visual Studio, that gets flagged with a tooltip saying Import with 'require' cannot be used when targeting ECMAScript 6 or higher.
I then tried:
/// <reference path="../../node_modules/@types/node/index.d.ts" />
import {assert} from 'assert';
Which generates Error TS2305 Module '"assert"' has no exported member 'assert'.
I've also tried:
/// <reference path="../../node_modules/@types/node/index.d.ts" />
import assert from 'assert';
Which generates Error TS1192 Module '"assert"' has no default export.