Skip to content

Stream does not emit finish #245

@jseanxu

Description

@jseanxu

The stream does not emit a "finish" event.

My scenario is that I listen to the "error" event and proceed differently after the TS compilation depending on if there were errors present. Without the "finish" event I am forced to manually pull out the data and unable to write something like

var error = false;
ts({
        noEmitOnError: true,
        noImplicitAny: true,
        sortOutput: true,
        suppressImplicitAnyIndexErrors: true,
        target: "ES6",
      }))
 .once("error", function () { error = true; })
 .once("finish", function () { console.log(error ? "yay" : "nay") }));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions