Migrate brick/varexporter to TypeScript

C Runtime-assisted · version 0.7.0

brick/varexporter 0.7.0 is a PHP package released under the MIT license and requires PHP ^8.2. Pext migrates it to TypeScript; on Node.js, 30 of 58 PHPUnit tests pass (51.7%), with 14 failures and 14 errors. It depends on 1 tracked package (weakest tier: Runtime-assisted), and 3 tracked packages depend on it.

A powerful alternative to var_export(), which can export closures and objects without __set_state()

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

PHPUnit results on Node.js

51.7% of 58 tests passing (30 passed, 14 failed, 14 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
ExportClosureTest13
ExportObjectTest9
VarExporterTest6

What “Runtime-assisted” means

Runs and passes most of its tests, with the Pext runtime doing visible work to preserve PHP behaviour.

Requirements

PHP
^8.2
Extensions
None declared

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

Dependencies

Weakest dependency: C Runtime-assisted

Used by

More from brick

Upstream

Version
0.7.0
License
MIT
Keywords
var_export

Migrating a codebase that uses brick/varexporter?

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