Skip to content

Commit 3f96e7d

Browse files
committed
PR remarks
1 parent b02c813 commit 3f96e7d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

specification/_spec_utils/FlagsEnum.ts renamed to specification/_spec_utils/PipeSeparatedFlags.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
*/
1919

2020
/**
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
2323
*
2424
* Depending on the target language, code generators can use this hint to generate language specific
2525
* flags enum constructs and the corresponding (de-)serialization code.
2626
*/
27-
export type FlagsEnum<T> = T
27+
export type PipeSeparatedFlags<T> = T | string

specification/_types/query_dsl/fulltext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { Script } from '@_types/Scripting'
2929
import { QueryBase } from './abstractions'
3030
import { Operator } from './Operator'
3131
import { DateMath, TimeZone } from '@_types/Time'
32-
import { FlagsEnum } from '@spec_utils/FlagsEnum'
32+
import { FlagsEnum, PipeSeparatedFlags } from '@spec_utils/PipeSeparatedFlags'
3333

3434
/**
3535
* @shortcut_property query
@@ -273,7 +273,7 @@ export class QueryStringQuery extends QueryBase {
273273
* Query flags can be either a single flag or a combination of flags, e.g. `OR|AND|PREFIX`
274274
* @doc_id supported-flags
275275
*/
276-
export type SimpleQueryStringFlags = FlagsEnum<SimpleQueryStringFlag[]>
276+
export type SimpleQueryStringFlags = PipeSeparatedFlags<SimpleQueryStringFlag>
277277

278278
export enum SimpleQueryStringFlag {
279279
NONE = 0,

0 commit comments

Comments
 (0)