Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Typescript Transformer Laravel Package

spatie/laravel-typescript-transformer

Convert PHP classes, enums, and more into TypeScript types automatically in Laravel. Mark PHP code with attributes, handle complex types and generics, and generate TS-friendly definitions (and even functions) to keep frontend types in sync.

View on GitHub
Deep Wiki
Context7
3.0.3

What's Changed

Full Changelog: https://github.com/spatie/laravel-typescript-transformer/compare/3.0.2...3.0.3

3.0.2

What's fixed

  • Fixed incorrect namespace and non-existent class in typescript:install command stub (#69)
    • Spatie\TypeScriptTransformer\Laravel\TypeScriptTransformerApplicationServiceProviderSpatie\LaravelTypeScriptTransformer\TypeScriptTransformerApplicationServiceProvider
    • NamespaceWriterGlobalNamespaceWriter
3.0.1

What's Changed

  • Fix generic arity mismatch in paginator interface type aliases
  • Inject Runner via handle() method for testability
  • Add tests for TransformTypeScriptCommand
  • Update publishable service provider stub path
3.0.0

This is a major release built on top of the completely rewritten spatie/typescript-transformer v3.

What's New

  • Everything new in spatie/typescript-transformer v3
  • Service provider configuration - Configure the package in a service provider instead of a config file
  • Controller type generation - Automatically generate TypeScript types for your Laravel controller actions, including request parameters and response types
  • Route type generation - Generate a typed route helper with full autocompletion for route names and parameters
  • Watch mode - File watcher that automatically regenerates TypeScript types as you develop

Breaking Changes

  • Requires PHP 8.2+ and Laravel 10+
  • Configuration moved from config file to service provider
  • Depends on spatie/typescript-transformer ^3.0

Since it is a complete rewrite, we recommend reading through the new docs and updating your application accodingly.

2.6.0
  • Added support for Laravel 13
  • Dropped support for Laravel 8 and 9
2.5.2

What's Changed

Full Changelog: https://github.com/spatie/laravel-typescript-transformer/compare/2.5.1...2.5.2

2.3.2
  • Use Laravel typescript transformer by default (#34)
  • Replace CarbonInterface with a string (#33)
2.3.1
  • Replace CarbonInterface with a string (#33)
2.3.0
  • Drop support for PHP 8.0
  • Enable collecting of enums by default
2.2.0
  • Add a native enum transformer by default
2.1.6
  • composer bump for typescript-transformer
  • add test suite for php 8.2
2.1.5
  • do not fail when spatie/enum is not installed
2.1.4
  • use package service provider to fix publishing config
2.1.3
2.1.2
2.1.1
  • add support for transforming to native TypeScript enums
2.1.0
  • add support for PHP 8.1
  • drop support for Laravel 7
  • fix issue with union types and Laravel collection transformer
2.0.0
  • The package is now PHP 8 only
  • Added TypeReflectors to reflect method return types, method parameters & class properties within your transformers
  • Added support for attributes
  • Added support for manually adding TypeScript to a class or property
  • Added formatters like Prettier which can format TypeScript code
  • Added support for inlining types directly
  • Updated the DtoTransformer to be a lot more flexible for your own projects
  • Added support for PHP 8 union types
1.1.2
  • Add support for configuring the writers (#7)
1.1.1
  • Add support for PHP 8
1.1.0
  • Moved SpatieEnumTransformer to the typescript-transformer package
1.0.1
  • Add support for Laravel 8
1.0.0
  • Initial release
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport