---
lang: en
title: 'API docs: repository.dynamicmodelctor'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.dynamicmodelctor.html
---

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [DynamicModelCtor](./repository.dynamicmodelctor.md)

## DynamicModelCtor type

A type describing a model class created via `defineModelClass`<!-- -->.

Assuming template arguments `BaseCtor` and `Props`<!-- -->, this type describes a class constructor with the following properties: - a constructor function accepting `DataObject<Props>` as the only argument, this argument is optional - all static fields (properties, methods) from `BaseCtor` are inherited and available as static fields on the dynamic class - all prototype fields from `BaseCtor` prototype are inherited and available as prototype fields on the dynamic class

<b>Signature:</b>

```typescript
export declare type DynamicModelCtor<BaseCtor extends typeof Model, Props extends object> = BaseCtor & {
    new (data?: DataObject<PrototypeOf<BaseCtor> & Props>): PrototypeOf<BaseCtor> & Props;
};
```

