1 | import { FieldPosition } from "./FieldPosition";
|
2 | export type FieldOptions = {
|
3 | name: string;
|
4 | kind?: FieldPosition;
|
5 | values?: string[];
|
6 | };
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class Field {
|
20 | readonly name: string;
|
21 | readonly kind: FieldPosition;
|
22 | values: string[];
|
23 | constructor({ name, kind, values }: FieldOptions);
|
24 | /**
|
25 | * Appends a value to the field.
|
26 | *
|
27 | * @param value The value to append.
|
28 | */
|
29 | add(value: string): void;
|
30 | /**
|
31 | * Overwrite existing field values.
|
32 | *
|
33 | * @param values The new field values.
|
34 | */
|
35 | set(values: string[]): void;
|
36 | /**
|
37 | * Remove all matching entries from list.
|
38 | *
|
39 | * @param value Value to remove.
|
40 | */
|
41 | remove(value: string): void;
|
42 | /**
|
43 | * Get comma-delimited string.
|
44 | *
|
45 | * @returns String representation of {@link Field}.
|
46 | */
|
47 | toString(): string;
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 | get(): string[];
|
54 | }
|