[BUG] Unresolved array-key type
Closed this issue · 1 comments
shuqingzai commented
I use spatie/laravel-data
to trigger the bug
Example:
class Input extends BaseInput
{
/**
* @param Collection<array-key, array-key> $product_ids
*/
public function __construct(
public Collection $product_ids,
) {
}
}
php artisan typescript:transform
# ouput error
# Could not transform type: array-key
See:
If Type
implements the \phpDocumentor\Reflection\PseudoType
interface, it should call \phpDocumentor\Reflection\PseudoType::underlyingType()
to return the correct Type
rubenvanassche commented
This should be fixed with the newest version of TypeScript transformer.