# Source: https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md

# TsMorphMetadataProvider<!-- -->

### Hierarchy

* [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md)
  * *TsMorphMetadataProvider*

## Index[**](#Index)

### Constructors

* [**constructor](#constructor)

### Methods

* [**getExistingSourceFile](#getExistingSourceFile)
* [**loadEntityMetadata](#loadEntityMetadata)
* [**loadFromCache](#loadFromCache)
* [**useCache](#useCache)

## Constructors<!-- -->[**](#Constructors)

### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L13)constructor

* ****new TsMorphMetadataProvider**(config): [TsMorphMetadataProvider](https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md)

- Inherited from MetadataProvider.constructor

  #### Parameters

  * ##### config: [IConfiguration](https://mikro-orm.io/api/core/interface/IConfiguration.md)

  #### Returns [TsMorphMetadataProvider](https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md)

## Methods<!-- -->[**](#Methods)

### [**](#getExistingSourceFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/reflection/src/TsMorphMetadataProvider.ts#L30)getExistingSourceFile

* ****getExistingSourceFile**(path, ext, validate): SourceFile

- #### Parameters

  * ##### path: string
  * ##### optionalext: string
  * ##### validate: boolean = <!-- -->true

  #### Returns SourceFile

### [**](#loadEntityMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/reflection/src/TsMorphMetadataProvider.ts#L22)loadEntityMetadata

* ****loadEntityMetadata**(meta, name): void

- Overrides MetadataProvider.loadEntityMetadata

  #### Parameters

  * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\<any>
  * ##### name: string

  #### Returns void

### [**](#loadFromCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L17)inheritedloadFromCache

* ****loadFromCache**(meta, cache): void

- Inherited from MetadataProvider.loadFromCache

  #### Parameters

  * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\<any>
  * ##### cache: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\<any>

  #### Returns void

### [**](#useCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/reflection/src/TsMorphMetadataProvider.ts#L18)useCache

* ****useCache**(): boolean

- Overrides MetadataProvider.useCache

  #### Returns boolean