power-assert-js/espower-typescript

use typescript source code for output instead of compiled javascript

DetachHead opened this issue · 0 comments

is it possible to use the typescript source code in the output using source maps?

current behavior:

input:

const assert = require("assert");

it('test', async () => {
    const foo = {
        bar: 1
    }
    assert(foo?.bar === 2)
})

output:

  assert((foo === null || foo === void 0 ? void 0 : foo.bar) === 2)
          |   |        |  |   |   |                 |   |    |     
          |   |        |  |   |   |                 |   1    false 
          |   |        |  |   |   undefined         Object{bar:1}
          |   |        |  |   false
          |   |        |  Object{bar:1}
          |   false    false
          Object{bar:1}