Skip to content

Lazy properties having types rendered as any #442

Answered by KKSzymanowski
atoff asked this question in Q&A
Discussion options

You must be logged in to vote

Replacing DtoTransformer with DataTypeScriptTransformer in the typescript-transformer config worked for me.

--- a/config/typescript-transformer.php
+++ b/config/typescript-transformer.php
@@ -1,5 +1,7 @@
 <?php
 
+use Spatie\LaravelData\Support\TypeScriptTransformer\DataTypeScriptTransformer;
+
 return [
     /*
      * The paths where typescript-transformer will look for PHP classes
@@ -30,7 +32,7 @@
         Spatie\LaravelTypeScriptTransformer\Transformers\SpatieStateTransformer::class,
         Spatie\TypeScriptTransformer\Transformers\EnumTransformer::class,
         Spatie\TypeScriptTransformer\Transformers\SpatieEnumTransformer::class,
-        Spatie\LaravelTypeScriptTransformer\Tr…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@atoff
Comment options

@KKSzymanowski
Comment options

@KKSzymanowski
Comment options

Answer selected by atoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants