Download the PHP package carthage-software/ext-typst-stubs without Composer
On this page you can find all versions of the php package carthage-software/ext-typst-stubs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carthage-software/ext-typst-stubs
More information about carthage-software/ext-typst-stubs
Files in carthage-software/ext-typst-stubs
Package ext-typst-stubs
Short Description IDE and static analysis stubs for ext-typst, the Typst typesetting engine for PHP.
License MIT Apache-2.0
Homepage https://ext-typst.carthage.software
Informations about the package ext-typst-stubs
ext-typst-stubs
IDE and static-analysis stubs for ext-typst, the Typst typesetting engine for PHP.
[!NOTE] This repository is a mirror. Its contents are generated from the
stubs/directory ofcarthage-software/ext-typstand pushed here automatically on every change. Do not edit it directly; open PRs againstcarthage-software/ext-typst.
Installation
Each tag matches the corresponding ext-typst release, so you can pin the
stubs to the extension version you target (e.g. ^0.2).
What this gives you
The stubs declare the Typst\* classes, interfaces, enums, and functions that
the compiled extension provides, so editors and analyzers understand the API
even on machines where the extension isn't installed.
- PhpStorm and Mago: discover the stubs automatically (they index
vendor/). -
PHPStan: add the stub directory to your
phpstan.neon: - Psalm: reference the stubs in your
psalm.xml:
The class stubs are PSR-4 autoloadable. When the extension is loaded, the
autoloader is never consulted for Typst\* (the real classes already exist).
When it isn't, calling any stub method throws an Error explaining that the
extension must be installed; so a missing extension fails loudly instead of
silently.
License
MIT OR Apache-2.0