zaaack opened this issue 7 years ago · 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.
import assert from "power-assert"
Current workaround is const assert = require('assert')
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').
import assert from 'assert'
import * as assert from 'assert'