Skip to content

Returnless-com/inertia-typescript-generator

Repository files navigation

Typescript Generator

This package allows you to generate typescript types from your PHP classes.

Installation

{
  "require": {
    "returnless/inertia-typescript-generator": "dev-main"
  },
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/Returnless-com/inertia-typescript-generator.git"
    }
  ]
}

Usage

Using attributes

class DummyClass
{
    protected string $viewPath = 'my-view-path';

    public function myMethod(): string
    {
        // ...
    }
}

#[Returnless\InertiaTypescriptGenerator\Attributes\Typescript(DummyClass::class)]
class MyController
{
    // ....
}
php artisan inertia-typescript:generate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages