Migrate sebastian/type to TypeScript

B Production-ready · version 6.0.3

sebastian/type 6.0.3 is a PHP package released under the BSD-3-Clause license and requires PHP >=8.3. Pext migrates it to TypeScript; on Node.js, 264 of 266 PHPUnit tests pass (99.2%), with 2 failures and no errors. It has no tracked dependencies, and 1 tracked package depends on it.

Collection of value objects that represent the types of the PHP type system

ConvertsYes
Runs on Node.jsYes
Runs on BunNot yet measured
TypeScript typesNot emitted

PHPUnit results on Node.js

99.2% of 266 tests passing (264 passed, 2 failed, 0 errors, 0 skipped). Verified 2026-10-23.

Where tests fail

The test class with the most failing tests on Node.js:

Test classFailing tests
ReflectionMapperTest2

What “Production-ready” means

Passes at least 80% of its original tests and behaves like the PHP original on the paths that matter. Remaining gaps are tracked.

Requirements

PHP
>=8.3
Extensions
None declared

As declared in the package's Composer metadata. Pext provides PHP extensions through its runtime modules.

Dependencies

No tracked dependencies.

Used by

More from sebastian

Upstream

Version
6.0.3
License
BSD-3-Clause
Homepage
https://github.com/sebastianbergmann/type

Migrating a codebase that uses sebastian/type?

See how Pext migrates a real PHP application, its Composer dependencies and its test suite to TypeScript.