laravel-typescript
laravel-typescript copied to clipboard
rule `present` in array items validation
Hi. First of all thanks for such a great package.
I've come accross issue
If i have request with the following rules
return [
'config' => ['required', 'array'],
'config.*.key' => ['required', 'string'],
'config.*.value' => ['present', 'nullable']
];
the result of transformation is
export interface ConfigUpdateRequest {
config: Array<{
key: string;
value: present | null;
}>;
}
which is incorrect because present
is not typescript built-in type nor interface
seems like this rule is missing in the CONTROL_KEYS
const in RequestGenerator.php#L21