@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
63 lines (33 loc) • 1.18 kB
Markdown
---
lang: en
title: 'API docs: rest.createcontrollerfactoryforinstance'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.createcontrollerfactoryforinstance.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [createControllerFactoryForInstance](./rest.createcontrollerfactoryforinstance.md)
## createControllerFactoryForInstance() function
Create a controller factory function for a given instance
**Signature:**
```typescript
export declare function createControllerFactoryForInstance<T extends object>(controllerInst: T): ControllerFactory<T>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
controllerInst
</td><td markdown="1">
T
</td><td markdown="1">
</td></tr>
</tbody></table>
**Returns:**
[ControllerFactory](./rest.controllerfactory.md)<!-- --><T>