iq2i/typescript-types-bundle
Composer 安装命令:
composer require iq2i/typescript-types-bundle
包简介
Symfony bundle that downloads TypeScript type definitions from npm packages via jsDelivr CDN, enabling IDE autocompletion with Symfony AssetMapper.
README 文档
README
Symfony bundle that downloads TypeScript type definitions (.d.ts files) from npm packages via the jsDelivr CDN, enabling IDE autocompletion when using TypeScript with Symfony AssetMapper.
Installation
composer require --dev iq2i/typescript-types-bundle
If you don't use Symfony Flex, enable the bundle manually in config/bundles.php:
return [ IQ2i\TypescriptTypesBundle\IQ2iTypescriptTypesBundle::class => ['all' => true], ];
Usage
Download TypeScript type definitions for all packages declared in importmap.php:
php bin/console typescript:types:download
The command reads your importmap.php file, resolves type definitions for each versioned package, and downloads them into assets/vendor/@types/<package>/.
For scoped packages, the / separator is replaced with __ (e.g. @hotwired/stimulus → assets/vendor/@types/@hotwired/stimulus/).
tsconfig.json
After downloading, the command automatically creates or updates tsconfig.json at the root of your project with the appropriate paths configuration so your IDE can resolve the types:
{
"compilerOptions": {
"paths": {
"@hotwired/stimulus": ["./assets/vendor/@types/@hotwired/stimulus"]
}
}
}
If tsconfig.json already exists, only missing or outdated paths are added.
Documentation
See docs/index.md for the full documentation.
License
This bundle is released under the MIT License.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-27