iq2i/typescript-types-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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/stimulusassets/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
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-27