What happened?
#[TypeScript]
class MonthlyRankedRecordData extends Data
{
public function __construct(
public string $id,
public UserData|Optional $user,
public int $year,
public int $month,
public int $rank_points,
public RankTitleData|Optional $rankTitle,
) {}
}
Tried replacing reference to class Spatie\LaravelData\Optionalinclass App\Features\MonthlyRankedRecord\Data\MonthlyRankedRecordData but it was not found in the transformed types
Even adding #[TypeScriptOptional] doesn't work
How to reproduce the bug
Add Optional on your DTO
Package Version
3.0.3
PHP Version
8.4
Which operating systems does with happen with?
Windows
Notes
No response
What happened?
Tried replacing reference toclass Spatie\LaravelData\Optionalinclass App\Features\MonthlyRankedRecord\Data\MonthlyRankedRecordDatabut it was not found in the transformed typesEven adding
#[TypeScriptOptional]doesn't workHow to reproduce the bug
Add Optional on your DTO
Package Version
3.0.3
PHP Version
8.4
Which operating systems does with happen with?
Windows
Notes
No response