rocket-connect / for-emit-of

Turn Node.js Events into Async Iterables.
https://www.npmjs.com/package/for-emit-of
MIT License
9 stars 2 forks source link

Module transpilation #10

Closed danstarns closed 4 years ago

danstarns commented 4 years ago

Closes [#9 ]

Remove types script Removes Babel Fix conflicting type definitions

Supports

import forEmitOf from "for-emit-of"
const forEmitOf = require("for-emit-of")
Farenheith commented 4 years ago

With this change, you removed the conflict and it looks all good. The transpiled code looks equivalent to the previews one, and the module will be imported like this:

// or

import forEmitOf = require("for-emit-of");


* With TypeScript using **"esModuleInterop": false** compilerOption:
```ts
import forEmitOf = require("for-emit-of");

I successfully tested it in the four scenarios, If that's the behavior you intend to have, then you're good to go :)

danstarns commented 4 years ago

@Farenheith Thanks for taking the time to look 👍