Closed zaaack closed 6 years ago
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'
error message:
Then I tried
import assert from "power-assert"
, it worked, but no fancy power message.Current workaround is
const assert = require('assert')