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