Skip to content

chubbyphp/chubbyphp-typescript

Repository files navigation

chubbyphp-typescript

CI Coverage Status Mutation testing badge Latest Stable Version Total Downloads Monthly Downloads

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

Typescript classes ported to PHP.

Requirements

  • php: ^8.3

Installation

Through Composer as chubbyphp/chubbyphp-typescript.

composer require chubbyphp/chubbyphp-typescript "^1.0"

Usage

Arr (Array)

A PHP port of the JavaScript Array class. See the full documentation for API reference and examples.

use Chubbyphp\Typescript\Arr;

$arr = new Arr(1, 2, 3, 4, 5);
$arr->push(6);
$arr->pop();
$arr->map(static fn (int $v): int => $v ** 2);
// iterator_to_array($arr->values()) => [1, 4, 9, 16, 25]

Copyright

2026 Dominik Zogg

About

Typescript classes ported to PHP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages