import { EntityBase , EntityIdentifiable } from '../entity-base' ; import { Filter } from '../filter' ; import { EdmTypeShared } from '../edm-types' ; import { DeSerializers , DeserializedType } from '../de-serializers' ; import { ComplexTypeField , getEntityConstructor } from './complex-type-field' ; import { ConstructorOrField } from './constructor-or-field' ; import { Field , FieldOptions } from './field' ; typeparam typeparam type NullableFieldType < FieldT , NullableT extends boolean > = NullableT extends true ? FieldT | null : FieldT ; typeparam typeparam internal export type FieldTypeByEdmType < T extends DeSerializers , EdmT extends EdmTypeShared < 'any' > , NullableT extends boolean > = NullableFieldType < DeserializedType < T , EdmT > , NullableT > ; typeparam typeparam typeparam typeparam typeparam internal export class EdmTypeField < EntityT extends EntityBase , DeSerializersT extends DeSerializers , EdmT extends EdmTypeShared < 'any' > , NullableT extends boolean = false , SelectableT extends boolean = false > extends Field < EntityT , NullableT , SelectableT > implements EntityIdentifiable < EntityT , DeSerializersT > { readonly _entity : EntityT ; param fieldName param _fieldOf param edmType param _deSerializers param fieldOptions constructor ( fieldName , readonly _fieldOf , readonly edmType , public _deSerializers , fieldOptions ? ) { super ( fieldName , getEntityConstructor ( _fieldOf ) , fieldOptions ) ; } param value returns equals ( value ) { return new Filter ( this . fieldPath ( ) , 'eq' , value , this . edmType ) ; } param value returns notEquals ( value ) { return new Filter ( this . fieldPath ( ) , 'ne' , value , this . edmType ) ; } returns fieldPath ( ) { return this . _fieldOf instanceof ComplexTypeField ? `${ this . _fieldOf . fieldPath ( ) }/${ this . _fieldName }` : this . _fieldName ; } }