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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [resolveType](./repository.resolvetype.md)

## resolveType() function

Resolve a type value that may have been provided via TypeResolver.

**Signature:**

```typescript
export declare function resolveType<T extends object>(fn: TypeResolver<T, {}> | Class<T> | Function): Class<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  fn | [TypeResolver](./repository.typeresolver.md)<!-- -->&lt;T, {}&gt; \| [Class](./repository.class.md)<!-- -->&lt;T&gt; \| Function | A type class or a type provider. |

**Returns:**

[Class](./repository.class.md)<!-- -->&lt;T&gt;

The resolved type.


