Version: 4.3

Class: TsMorphMetadataProvider

Hierarchy

  • MetadataProvider

    TsMorphMetadataProvider

Constructors

constructor

+ new TsMorphMetadataProvider(config: IConfiguration): TsMorphMetadataProvider

Inherited from TsMorphMetadataProvider.constructor

Defined in packages/core/dist/metadata/MetadataProvider.d.ts:6

Parameters:

NameType
configIConfiguration

Returns: TsMorphMetadataProvider

Properties

config

Protected Readonly config: IConfiguration

Inherited from TsMorphMetadataProvider.config

Defined in packages/core/dist/metadata/MetadataProvider.d.ts:6


project

Private Readonly project: Project = new Project({ compilerOptions: { strictNullChecks: true, }, })

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): string

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

Parameters:

NameType
propEntityProperty

Returns: string


getExistingSourceFile

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

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

Parameters:

NameTypeDefault value
pathstring-
ext?string-
validatebooleantrue

Returns: Promise<SourceFile>


getSourceFile

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

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

Parameters:

NameType
tsPathstring
validateboolean

Returns: Promise<SourceFile | undefined>


initProperties

ProtectedinitProperties(meta: EntityMetadata): Promise<void>

Overrides void

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

Parameters:

NameType
metaEntityMetadata

Returns: Promise<void>


initPropertyType

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

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

Parameters:

NameType
metaEntityMetadata
propEntityProperty

Returns: Promise<void>


initSourceFiles

PrivateinitSourceFiles(): Promise<void>

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

Returns: Promise<void>


loadEntityMetadata

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

Overrides void

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

Parameters:

NameType
metaEntityMetadata
namestring

Returns: Promise<void>


loadFromCache

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

Inherited from TsMorphMetadataProvider.loadFromCache

Defined in packages/core/dist/metadata/MetadataProvider.d.ts:9

Parameters:

NameType
metaEntityMetadata
cacheEntityMetadata

Returns: void


processWrapper

PrivateprocessWrapper(prop: EntityProperty, wrapper: string): void

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

Parameters:

NameType
propEntityProperty
wrapperstring

Returns: void


readTypeFromSource

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

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

Parameters:

NameType
metaEntityMetadata
propEntityProperty

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


useCache

useCache(): boolean

Overrides void

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

Returns: boolean

Last updated on by Martin Adámek