@loopback/docs
Version:
Documentation for LoopBack 4
33 lines (21 loc) • 1.05 kB
Markdown
---
lang: en
title: 'API docs: repository.property.array'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.property.array.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [property](./repository.property.md) > [array](./repository.property.array.md)
## property.array() function
<b>Signature:</b>
```typescript
function array(itemType: PropertyType, definition?: Partial<PropertyDefinition>): (target: object, propertyName: string) => void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| itemType | <code>PropertyType</code> | The type of array items. Examples: <code>number</code>, <code>Product</code>, <code>() => Order</code>. |
| definition | <code>Partial<PropertyDefinition></code> | Optional PropertyDefinition object for additional metadata |
<b>Returns:</b>
`(target: object, propertyName: string) => void`