1 | import type { BlockScalar, FlowScalar } from '../parse/cst';
|
2 | import type { Range } from './Node';
|
3 | import { NodeBase } from './Node';
|
4 | import type { ToJSContext } from './toJS';
|
5 | export declare const isScalarValue: (value: unknown) => boolean;
|
6 | export declare namespace Scalar {
|
7 | interface Parsed extends Scalar {
|
8 | range: Range;
|
9 | source: string;
|
10 | srcToken?: FlowScalar | BlockScalar;
|
11 | }
|
12 | type BLOCK_FOLDED = 'BLOCK_FOLDED';
|
13 | type BLOCK_LITERAL = 'BLOCK_LITERAL';
|
14 | type PLAIN = 'PLAIN';
|
15 | type QUOTE_DOUBLE = 'QUOTE_DOUBLE';
|
16 | type QUOTE_SINGLE = 'QUOTE_SINGLE';
|
17 | type Type = BLOCK_FOLDED | BLOCK_LITERAL | PLAIN | QUOTE_DOUBLE | QUOTE_SINGLE;
|
18 | }
|
19 | export declare class Scalar<T = unknown> extends NodeBase {
|
20 | static readonly BLOCK_FOLDED = "BLOCK_FOLDED";
|
21 | static readonly BLOCK_LITERAL = "BLOCK_LITERAL";
|
22 | static readonly PLAIN = "PLAIN";
|
23 | static readonly QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
24 | static readonly QUOTE_SINGLE = "QUOTE_SINGLE";
|
25 | value: T;
|
26 |
|
27 | anchor?: string;
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 | format?: string;
|
34 |
|
35 | minFractionDigits?: number;
|
36 |
|
37 | source?: string;
|
38 |
|
39 | type?: Scalar.Type;
|
40 | constructor(value: T);
|
41 | toJSON(arg?: any, ctx?: ToJSContext): any;
|
42 | toString(): string;
|
43 | }
|