---
lang: en
title: 'API docs: repository.modeldefinition._constructor_'
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.modeldefinition._constructor_.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [ModelDefinition](./repository.modeldefinition.md) &gt; [(constructor)](./repository.modeldefinition._constructor_.md)

## ModelDefinition.(constructor)

Constructs a new instance of the `ModelDefinition` class

<b>Signature:</b>

```typescript
constructor(nameOrDef: string | ModelDefinitionSyntax);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  nameOrDef | string \| [ModelDefinitionSyntax](./repository.modeldefinitionsyntax.md) |  |


