@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
34 lines (22 loc) • 1.22 kB
Markdown
---
lang: en
title: 'API docs: repository.property.array'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
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 | [PropertyType](./repository.propertytype.md) | The type of array items. Examples: <code>number</code>, <code>Product</code>, <code>() => Order</code>. |
| definition | Partial<[PropertyDefinition](./repository.propertydefinition.md)<!-- -->> | Optional PropertyDefinition object for additional metadata |
<b>Returns:</b>
(target: object, propertyName: string) => void