UNPKG

2.07 kBTypeScriptView Raw
1import { TextDocument, Range } from 'vscode-languageserver-types';
2import { Argument } from './argument';
3export declare class Property {
4 private document;
5 private escapeChar;
6 private readonly range;
7 private readonly nameRange;
8 private readonly name;
9 private readonly assignmentOperatorRange;
10 private readonly assignmentOperator;
11 private readonly valueRange;
12 private readonly value;
13 constructor(document: TextDocument, escapeChar: string, arg: Argument, arg2?: Argument);
14 getRange(): Range;
15 getName(): string;
16 getNameRange(): Range;
17 getValue(): string | null;
18 getValueRange(): Range | null;
19 /**
20 * Retrieves the operator used for delimiting between the name and
21 * value of this property. This will either be the "=" character
22 * or null if a character was not used or if this property has no
23 * value defined.
24 */
25 getAssignmentOperator(): string | null;
26 getAssignmentOperatorRange(): Range | null;
27 /**
28 * Returns the value of this property including any enclosing
29 * single or double quotes and relevant escape characters.
30 * Escaped newlines and its associated contiguous whitespace
31 * characters however will not be returned as they are deemed to
32 * be uninteresting to clients trying to return a Dockerfile.
33 *
34 * @return the unescaped value of this property or null if this
35 * property has no associated value
36 */
37 getUnescapedValue(): string | null;
38 private static getNameRange;
39 private static getValueRange;
40 /**
41 * Returns the actual value of this key-value pair. The value will
42 * have its escape characters removed if applicable. If the value
43 * spans multiple lines and there are comments nested within the
44 * lines, they too will be removed.
45 *
46 * @return the value that this key-value pair will actually be, may
47 * be null if no value is defined, may be the empty string
48 * if the value only consists of whitespace
49 */
50 private static getValue;
51}