Page Contents
Home > @loopback/repository > property > array
property.array() function
Signature:
function array(itemType: PropertyType, definition?: Partial<PropertyDefinition>): (target: object, propertyName: string) => void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| itemType | PropertyType | The type of array items. Examples: number, Product, () => Order. |
| definition | Partial<PropertyDefinition> | Optional PropertyDefinition object for additional metadata |
Returns:
(target: object, propertyName: string) => void