class Parameter

Properties

string $placeholder
string $types

Methods

__construct(string $name, bool $optional, string|null $key, string|null $default, ReflectionParameter|null $bound = null)

Create a new Parameter instance.

array
resolveTypes()

Resolve the TypeScript types for this parameter.

string
typeToTypeScript(string $type)

Map a database column type to a TypeScript primitive.

string
safeName()

Return the parameter name as a TypeScript-safe identifier.

Details

at line 19
__construct(string $name, bool $optional, string|null $key, string|null $default, ReflectionParameter|null $bound = null)

Create a new Parameter instance.

Parameters

string $name
bool $optional
string|null $key
string|null $default
ReflectionParameter|null $bound

at line 36
protected array resolveTypes()

Resolve the TypeScript types for this parameter.

Return Value

array

at line 60
protected string typeToTypeScript(string $type)

Map a database column type to a TypeScript primitive.

Parameters

string $type

Return Value

string

at line 92
string safeName()

Return the parameter name as a TypeScript-safe identifier.

Return Value

string