def output(self, _in, out, **kw):
        # The typescript compiler cannot read a file which does not have
        # the .ts extension. The output file needs to have an extension,
        # or the compiler will want to create a directory in its place.
        input_filename = tempfile.mktemp() + ".ts"
        output_filename = tempfile.mktemp() + ".js"

        with open(input_filename, 'w') as f:
            f.write(_in.read())

        args = [self.binary or 'tsc', '--out', output_filename, input_filename]
        proc = subprocess.Popen(
            args,
            stdin=subprocess.PIPE,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            shell=(os.name == 'nt'))
        stdout, stderr = proc.communicate()
        if proc.returncode != 0:
            raise FilterError(stderr % "typescript: subprocess had error: stderr=%s," +
                "stdout=%s, returncode=%s" % (stdout, proc.returncode))

        with open(output_filename, 'r') as f:
            out.write(f.read())

        os.unlink(input_filename)
        os.unlink(output_filename)
dataset/ETHPy150Open miracle2k/webassets/src/webassets/filter/typescript.py/TypeScript.output/swapped operands of `%`