import type { Constructor , Dictionary } from '../typings' ; import { MetadataStorage } from '../metadata' ; export function Embeddable ( options = { } ) { return function < T > ( target ) { const meta = MetadataStorage . getMetadataFromDecorator ( target ) ; meta . class = target as unknown as Constructor < T > ; meta . name = target . name ; meta . embeddable = true ; Object . assign ( meta , options ) ; return target ; } ; } export type EmbeddableOptions = { discriminatorColumn ? : string ; discriminatorMap ? : Dictionary < string > ; discriminatorValue ? : number | string ; abstract ? : boolean ; } ;