File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
20
20
/**
21
- * This type type marks the underlaying enum as a "flags enum". Individual members of flags enums
22
- * are combined using the pipe separator ("A|B|C|...").
21
+ * A set of flags that can be represented as a single enum value or a set of values that are encoded
22
+ * as a pipe-separated string
23
23
*
24
24
* Depending on the target language, code generators can use this hint to generate language specific
25
25
* flags enum constructs and the corresponding (de-)serialization code.
26
26
*/
27
- export type FlagsEnum < T > = T
27
+ export type PipeSeparatedFlags < T > = T | string
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import { Script } from '@_types/Scripting'
29
29
import { QueryBase } from './abstractions'
30
30
import { Operator } from './Operator'
31
31
import { DateMath , TimeZone } from '@_types/Time'
32
- import { FlagsEnum } from '@spec_utils/FlagsEnum '
32
+ import { FlagsEnum , PipeSeparatedFlags } from '@spec_utils/PipeSeparatedFlags '
33
33
34
34
/**
35
35
* @shortcut_property query
@@ -703,7 +703,7 @@ export class QueryStringQuery extends QueryBase {
703
703
* Query flags can be either a single flag or a combination of flags, e.g. `OR|AND|PREFIX`
704
704
* @doc_id supported-flags
705
705
*/
706
- export type SimpleQueryStringFlags = FlagsEnum < SimpleQueryStringFlag [ ] >
706
+ export type SimpleQueryStringFlags = PipeSeparatedFlags < SimpleQueryStringFlag >
707
707
708
708
export enum SimpleQueryStringFlag {
709
709
/**
@@ -722,7 +722,6 @@ export enum SimpleQueryStringFlag {
722
722
* Enables the `\|` OR operator.
723
723
*/
724
724
OR = 1 << 2 ,
725
-
726
725
/**
727
726
* Enables the `*` prefix operator.
728
727
*/
You can’t perform that action at this time.
0 commit comments