carthage-software/ext-typst-stubs
Composer 安装命令:
composer require carthage-software/ext-typst-stubs
包简介
IDE and static analysis stubs for ext-typst, the Typst typesetting engine for PHP.
README 文档
README
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 of carthage-software/ext-typst and pushed here automatically on
every change. Do not edit it directly; open PRs against
carthage-software/ext-typst.
Installation
composer require --dev carthage-software/ext-typst-stubs
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:parameters: scanDirectories: - vendor/carthage-software/ext-typst-stubs/stubs
-
Psalm: reference the stubs in your
psalm.xml:<stubs> <file name="vendor/carthage-software/ext-typst-stubs/stubs/Typst" /> </stubs>
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
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-05