@loopback/docs
Version:
Documentation for LoopBack 4
35 lines (22 loc) • 714 B
Markdown
lang: en
title: 'API docs: repository.constructorfunction'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.constructorfunction.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [ConstructorFunction](./repository.constructorfunction.md)
## ConstructorFunction interface
Interface for constructor functions without `new` operator.
<b>Signature:</b>
```typescript
export interface ConstructorFunction<T>
```
## Example
```ts
function Foo(x) {
if (!(this instanceof Foo)) { return new Foo(x); }
this.x = x;
}
```