import { ItemView } from "../models/view/itemView" ; import { LinkedIdType } from "../enums/linkedIdType" ; export class LinkedMetadata { constructor ( readonly propertyKey , private readonly _i18nKey ? ) { } get i18nKey ( ) { return this . _i18nKey ?? this . propertyKey ; } } param id param i18nKey export function linkedFieldOption ( id , i18nKey ? ) { return ( prototype , propertyKey ) => { if ( prototype . linkedFieldOptions == null ) { prototype . linkedFieldOptions = new Map < LinkedIdType , LinkedMetadata > ( ) ; } prototype . linkedFieldOptions . set ( id , new LinkedMetadata ( propertyKey , i18nKey ) ) ; } ; }