power-assert-js/espower-typescript

import assert from 'assert' don't work with ts@2.6.2

zaaack opened this issue · 1 comments

error message:

assert_1.default is not a function 

Then I tried import assert from "power-assert", it worked, but no fancy power message.

Current workaround is const assert = require('assert')

@zaaack import assert from 'assert' throws the error. It's by design of TypeScript and Node.js.
Use import * as assert from 'assert' or const assert = require('assert').