Skip to main content
Version: 4.4

Class: TsMorphMetadataProvider#

reflection.TsMorphMetadataProvider

Hierarchy#

Constructors#

constructor#

+ new TsMorphMetadataProvider(config: IConfiguration): TsMorphMetadataProvider

Parameters:#

NameType
configIConfiguration

Returns: TsMorphMetadataProvider

Inherited from: MetadataProvider

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

Properties#

config#

Protected Readonly config: IConfiguration

Inherited from: MetadataProvider.config


project#

Private Readonly project: Project

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:6


sources#

Private sources: SourceFile[]

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:12

Methods#

extractType#

PrivateextractType(prop: EntityProperty<any>): string

Parameters:#

NameType
propEntityProperty<any>

Returns: string

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:49


getExistingSourceFile#

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

Parameters:#

NameTypeDefault value
pathstring-
ext?string-
validatebooleantrue

Returns: Promise<SourceFile>

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:26


getSourceFile#

PrivategetSourceFile(tsPath: string, validate: boolean): Promise<undefined | SourceFile>

Parameters:#

NameType
tsPathstring
validateboolean

Returns: Promise<undefined | SourceFile>

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:100


initProperties#

ProtectedinitProperties(meta: EntityMetadata<any>): Promise<void>

Parameters:#

NameType
metaEntityMetadata<any>

Returns: Promise<void>

Overrides: MetadataProvider

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:36


initPropertyType#

PrivateinitPropertyType(meta: EntityMetadata<any>, prop: EntityProperty<any>): Promise<void>

Parameters:#

NameType
metaEntityMetadata<any>
propEntityProperty<any>

Returns: Promise<void>

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:61


initSourceFiles#

PrivateinitSourceFiles(): Promise<void>

Returns: Promise<void>

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:134


loadEntityMetadata#

loadEntityMetadata(meta: EntityMetadata<any>, name: string): Promise<void>

Parameters:#

NameType
metaEntityMetadata<any>
namestring

Returns: Promise<void>

Overrides: MetadataProvider

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:18


loadFromCache#

loadFromCache(meta: EntityMetadata<any>, cache: EntityMetadata<any>): void

Parameters:#

NameType
metaEntityMetadata<any>
cacheEntityMetadata<any>

Returns: void

Inherited from: MetadataProvider

Defined in: packages/core/src/metadata/MetadataProvider.ts:15


processWrapper#

PrivateprocessWrapper(prop: EntityProperty<any>, wrapper: string): void

Parameters:#

NameType
propEntityProperty<any>
wrapperstring

Returns: void

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:114


readTypeFromSource#

PrivatereadTypeFromSource(meta: EntityMetadata<any>, prop: EntityProperty<any>): Promise<{ optional?: undefined | boolean ; type: string }>

Parameters:#

NameType
metaEntityMetadata<any>
propEntityProperty<any>

Returns: Promise<{ optional?: undefined | boolean ; type: string }>

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:74


useCache#

useCache(): boolean

Returns: boolean

Overrides: MetadataProvider

Defined in: packages/reflection/src/TsMorphMetadataProvider.ts:14

Last updated on by renovate[bot]