import BigNumber from 'bignumber.js' ; import { EntityBase , Constructable } from '../entity-base' ; import { Time } from '../time' ; internal export type FieldType = string | number | boolean | Time | moment . Moment | moment . Duration | BigNumber | null | undefined ; internal export interface FieldOptions < NullableT extends boolean = false , SelectableT extends boolean = false > { /**
     * Whether the value of the field can be `null`.
     */ isNullable ? : NullableT ; /**
     * Whether the field can be reference in a `.select` statement.
     */ isSelectable ? : SelectableT ; } param fieldOptions returns internal export function getFieldOptions < NullableT extends boolean = false , SelectableT extends boolean = false > ( fieldOptions ? ) { return { ... defaultFieldOptions , ... fieldOptions } as Required < FieldOptions < NullableT , SelectableT > > ; } const defaultFieldOptions = { isNullable : false , isSelectable : false } ; typeparam typeparam typeparam internal export class Field < EntityT extends EntityBase , NullableT extends boolean = false , SelectableT extends boolean = false > { readonly _fieldOptions : Required < FieldOptions < NullableT , SelectableT > > ; param _fieldName param _entityConstructor param fieldOptions constructor ( readonly _fieldName , readonly _entityConstructor , fieldOptions ? ) { this . _fieldOptions = getFieldOptions ( fieldOptions ) ; } returns fieldPath ( ) { return this . _fieldName ; } }