Skip to main content
Version: Next

Class: TsMorphMetadataProvider

reflection.TsMorphMetadataProvider

Hierarchy#

Constructors#

constructor#

new TsMorphMetadataProvider(config)

Parameters#

NameType
configIConfiguration

Inherited from#

MetadataProvider.constructor

Defined in#

packages/core/src/metadata/MetadataProvider.ts:9

Methods#

getExistingSourceFile#

getExistingSourceFile(path, ext?, validate?): Promise<SourceFile>

Parameters#

NameTypeDefault value
pathstringundefined
ext?stringundefined
validatebooleantrue

Returns#

Promise<SourceFile>

Defined in#

packages/reflection/src/TsMorphMetadataProvider.ts:26


loadEntityMetadata#

loadEntityMetadata(meta, name): Promise<void>

Parameters#

NameType
metaEntityMetadata<any>
namestring

Returns#

Promise<void>

Overrides#

MetadataProvider.loadEntityMetadata

Defined in#

packages/reflection/src/TsMorphMetadataProvider.ts:18


loadFromCache#

loadFromCache(meta, cache): void

Re-hydrates missing attributes like customType (functions/instances are lost when caching to JSON)

Parameters#

NameType
metaEntityMetadata<any>
cacheEntityMetadata<any>

Returns#

void

Overrides#

MetadataProvider.loadFromCache

Defined in#

packages/reflection/src/TsMorphMetadataProvider.ts:39


useCache#

useCache(): boolean

Returns#

boolean

Overrides#

MetadataProvider.useCache

Defined in#

packages/reflection/src/TsMorphMetadataProvider.ts:14