import { DeSerializers } from '../de-serializers' ; import { EntityBase , EntityIdentifiable , EntityApi } from '../entity-base' ; import type { Expandable } from '../expandable' ; import type { Selectable } from './selectable' ; typeparam typeparam internal export class Link < EntityT extends EntityBase , DeSerializersT extends DeSerializers , LinkedEntityT extends EntityBase = any > implements EntityIdentifiable < EntityT , DeSerializersT > { readonly _entity : EntityT ; readonly _deSerializers : DeSerializersT ; /**
     * List of selectables on the linked entity.
     */ _selects : Selectable < LinkedEntityT , DeSerializersT > [ ] = [ ] ; _expand : Expandable < LinkedEntityT , DeSerializersT > [ ] = [ ] ; param _fieldName param _entityApi param _linkedEntity constructor ( readonly _fieldName , readonly _entityApi , readonly _linkedEntityApi ) { } param selects returns select ( ... selects ) { const link = this . clone ( ) ; link . _selects = selects ; return link ; } expand ( ... expands ) { const link = this . clone ( ) ; link . _expand = expands ; return link ; } typeparam typeparam param link returns clone ( ) { const clonedLink = new ( this . constructor as any ) ( this . _fieldName , this . _entityApi , this . _linkedEntityApi ) ; clonedLink . _selects = this . _selects ; clonedLink . _expand = this . _expand ; return clonedLink ; } }