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

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

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

## InvalidPolymorphismError.(constructor)

Constructs a new instance of the `InvalidPolymorphismError` class

<b>Signature:</b>

```typescript
constructor(typeName: string, discriminator?: string, extraProperties?: Props);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  typeName | string |  |
|  discriminator | string | <i>(Optional)</i> |
|  extraProperties | Props | <i>(Optional)</i> |


