TsMorphMetadataProvider
Hierarchy
- MetadataProvider
- TsMorphMetadataProvider
Index
Constructors
constructor
Parameters
config: IConfiguration
Returns TsMorphMetadataProvider
Methods
inheritedcombineCache
Combines individual metadata cache entries into a single file.
Returns void
inheritedgetCachedMetadata
Attempts to load metadata from cache, returning undefined if not available.
Parameters
meta: Pick<EntityMetadata<T, EntityCtor<T>>, className | path | root>
root: EntityMetadata<T, EntityCtor<T>>
Returns undefined | EntityMetadata<T, EntityCtor<T>>
getCacheKey
Returns the cache key for the given entity metadata.
Parameters
meta: Pick<EntityMetadata<any, EntityCtor<any>>, className | path>
Returns string
getExistingSourceFile
Parameters
path: string
optionalext: string
validate: boolean = true
Returns SourceFile
loadEntityMetadata
Resolves entity references and type information for all properties in the given metadata.
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns void
inheritedloadFromCache
Merges cached metadata into the given entity metadata, preserving function expressions.
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
cache: EntityMetadata<any, EntityCtor<any>>
Returns void
saveToCache
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns void
useCache
Whether metadata caching is enabled for this instance.
Returns boolean
staticuseCache
Whether this provider class uses metadata caching by default.
Returns boolean
Metadata provider that uses ts-morph to infer property types from TypeScript source files or declaration files.