Migrate dasprid/enum to TypeScript

D Converted · version 1.0.7

dasprid/enum 1.0.7 is a PHP package released under the BSD-2-Clause license and requires PHP >=7.1 <9.0. Pext migrates it to TypeScript; on Node.js, 7 of 60 PHPUnit tests pass (11.6%), with 19 failures and 34 errors. It has no tracked dependencies, and 1 tracked package depends on it.

PHP 7.1 enum implementation

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

PHPUnit results on Node.js

11.6% of 60 tests passing (7 passed, 19 failed, 34 errors, 0 skipped). Verified 2026-10-21.

Where tests fail

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

Test classFailing tests
EnumMapTest39
AbstractEnumTest13
NullValueTest1

What “Converted” means

Converts cleanly to TypeScript. Test verification is pending or still climbing.

Requirements

PHP
>=7.1 <9.0
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

Upstream

Version
1.0.7
License
BSD-2-Clause
Keywords
enum, map

Migrating a codebase that uses dasprid/enum?

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