We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a5596f7 + 973cab0 commit a268a08Copy full SHA for a268a08
src/TypeProcessors/LaravelCollectionTypeProcessor.php
@@ -15,6 +15,7 @@
15
use ReflectionUnionType;
16
use Spatie\TypeScriptTransformer\Structures\MissingSymbolsCollection;
17
use Spatie\TypeScriptTransformer\TypeProcessors\TypeProcessor;
18
+use Spatie\TypeScriptTransformer\Types\TypeScriptType;
19
20
class LaravelCollectionTypeProcessor implements TypeProcessor
21
{
@@ -31,6 +32,10 @@ public function process(
31
32
return $type;
33
}
34
35
+ if ($type instanceof TypeScriptType) {
36
+ return $type;
37
+ }
38
+
39
if ($this->isLaravelCollectionObject($type)) {
40
return new Array_();
41
0 commit comments