santran/tstophp

Typescript definition converter to PHP

dev-master 2019-06-23 07:05 UTC

This package is not auto-updated.

Last update: 2024-05-07 06:02:20 UTC


README

TP-to-PHP converter convert TypeScript definition to PHP code

Installation and requirements

The best way how to install TP-to-PHP is use a Composer:

php composer.phar require santran/tstophp

Usage

try {
    \tptophp\Converter::convert($tsFile, $phpFile);
}catch (\tptophp\UnexpectedSyntaxException $e){
	echo $e->getFullMessage();
}