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

[mcguffin/acf-customizer

Use ACF Fields in customizer.

7611.3k](/packages/mcguffin-acf-customizer)

PHPackages © 2026

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