src/Filter/TypeScript.php
public function input($filename, $input)
    {
        if (substr($filename, strlen($this->_settings['ext']) * -1) !== $this->_settings['ext']) {
            return $input;
        }

        $tmpFile = tempnam(TMP, 'TYPESCRIPT');
        $cmd = $this->_settings['typescript'] . " " . escapeshellarg($filename) . " --out " . $tmpFile;
        $this->_runCmd($cmd, null);
        $output = file_get_contents($tmpFile);
        unlink($tmpFile);
        return $output;
    }
public function input($filename, $input)
    {
        if (substr($filename, strlen($this->_settings['ext']) * -1) !== $this->_settings['ext']) {
            return $input;
        }

        $tmpFile = tempnam(TMP, 'TYPESCRIPT');
        $cmd = $this->_settings['typescript'] . " " . escapeshellarg($filename) . " --out " . $tmpFile;
        $this->_runCmd($cmd, null);
        $output = file_get_contents($tmpFile);
        unlink($tmpFile);
        return $output;
    }
public function input ( $ filename , $ input ) { if ( substr ( $ filename , strlen ( $ this -> _settings [ 'ext' ] ) * - 1 ) !== $ this -> _settings [ 'ext' ] ) { return $ input ; } $ tmpFile = tempnam ( TMP , 'TYPESCRIPT' ) ; $ cmd = $ this -> _settings [ 'typescript' ] . " " . escapeshellarg ( $ filename ) . " --out " . $ tmpFile ; $ this -> _runCmd ( $ cmd , null ) ; $ output = file_get_contents ( $ tmpFile ) ; unlink ( $ tmpFile ) ; return $ output ; }
Runs `tsc` against files that match the configured extension.

@param string $filename Filename being processed.
@param string $content Content of the file being processed.
@return string
Runs tsc against files that match the configured extension .