1 | import { Entity } from '../entity';
|
2 | import { EdmTypeShared } from '../edm-types';
|
3 | import { Filter } from '../filter';
|
4 | import { Field, FieldOptions } from './field';
|
5 | import { ConstructorOrField } from './constructor-or-field';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class EnumField<EntityT extends Entity, EnumT extends string = string, NullableT extends boolean = false, SelectableT extends boolean = false> extends Field<EntityT, NullableT, SelectableT> {
|
14 | readonly _fieldOf: ConstructorOrField<EntityT>;
|
15 | readonly enumType?: Record<string, EnumT> | undefined;
|
16 | |
17 |
|
18 |
|
19 | readonly edmType: EdmTypeShared<any>;
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | constructor(fieldName: string, _fieldOf: ConstructorOrField<EntityT>, enumType?: Record<string, EnumT> | undefined, fieldOptions?: FieldOptions<NullableT, SelectableT>);
|
28 | /**
|
29 | * Gets the path to the complex type property represented by this.
|
30 | * @returns The path to the complex type property.
|
31 | */
|
32 | fieldPath(): string;
|
33 | /**
|
34 | * Creates an instance of Filter for this field and the given value using the operator 'eq', i.e. `==`.
|
35 | * @param value - Value to be used in the filter
|
36 | * @returns The resulting filter
|
37 | */
|
38 | equals(value: EnumType<EnumT>): Filter<EntityT, string>;
|
39 | /**
|
40 | * Creates an instance of Filter for this field and the given value using the operator 'ne', i.e. `!=`.
|
41 | * @param value - Value to be used in the filter
|
42 | * @returns The resulting filter
|
43 | */
|
44 | notEquals(value: EnumType<EnumT>): Filter<EntityT, string>;
|
45 | }
|
46 | /**
|
47 | * Convenient type to reflect all the values of a string based enum as a union type.
|
48 | * @typeparam T - String based enum type
|
49 | * @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#template-literal-types
|
50 | */
|
51 | export declare type EnumType<T extends string> = `${T}`;
|
52 | //# sourceMappingURL=enum-field.d.ts.map |
\ | No newline at end of file |