iq2i/typescript-types-bundle

Symfony bundle that downloads TypeScript type definitions from npm packages via jsDelivr CDN, enabling IDE autocompletion with Symfony AssetMapper.

Maintainers

Package info

github.com/IQ2i/typescript-types-bundle

Type:symfony-bundle

pkg:composer/iq2i/typescript-types-bundle

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-03-02 15:42 UTC

This package is auto-updated.

Last update: 2026-03-02 15:42:21 UTC


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.