Skip to main content
Version: 5.9

TsMorphMetadataProvider

Hierarchy

  • MetadataProvider
    • TsMorphMetadataProvider

Index

Constructors

constructor

  • new TsMorphMetadataProvider(config: IConfiguration): TsMorphMetadataProvider
  • Parameters

    • config: IConfiguration

    Returns TsMorphMetadataProvider

Methods

getExistingSourceFile

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

    • path: string
    • optionalext: string
    • validate: boolean = true

    Returns Promise<SourceFile>

loadEntityMetadata

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

    • meta: EntityMetadata<any>
    • name: string

    Returns Promise<void>

loadFromCache

  • loadFromCache(meta: EntityMetadata<any>, cache: EntityMetadata<any>): void
  • Re-hydrates missing attributes like customType (functions/instances are lost when caching to JSON)


    Parameters

    • meta: EntityMetadata<any>
    • cache: EntityMetadata<any>

    Returns void

useCache

  • useCache(): boolean
  • Returns boolean