PHPackages                             santran/tstophp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. santran/tstophp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

santran/tstophp
===============

Typescript definition converter to PHP

03PHP

Since Jun 23Pushed 6y agoCompare

[ Source](https://github.com/mrsantran/tstophp)[ Packagist](https://packagist.org/packages/santran/tstophp)[ RSS](/packages/santran-tstophp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

About
-----

[](#about)

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

Installation and requirements
-----------------------------

[](#installation-and-requirements)

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

```
php composer.phar require santran/tstophp

```

Usage
-----

[](#usage)

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

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/05fcc8d2c99d7c53346781ea21d01e043ed1cd1597675f83e2be8bb3fa868836?d=identicon)[santran](/maintainers/santran)

---

Top Contributors

[![mrsantran](https://avatars.githubusercontent.com/u/21286108?v=4)](https://github.com/mrsantran "mrsantran (2 commits)")

### Embed Badge

![Health badge](/badges/santran-tstophp/health.svg)

```
[![Health](https://phpackages.com/badges/santran-tstophp/health.svg)](https://phpackages.com/packages/santran-tstophp)
```

###  Alternatives

[components/jqueryui

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

1795.8M57](/packages/components-jqueryui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
