jsonc-morph 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +12 -14
  2. package/esm/deps/jsr.io/@std/assert/1.0.19/almost_equals.d.ts.map +1 -0
  3. package/esm/deps/jsr.io/@std/assert/1.0.19/array_includes.d.ts.map +1 -0
  4. package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
  5. package/{script/deps/jsr.io/@std/assert/1.0.16 → esm/deps/jsr.io/@std/assert/1.0.19}/assertion_error.d.ts.map +1 -1
  6. package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
  7. package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
  8. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/exists.d.ts.map +1 -1
  9. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/fail.d.ts.map +1 -1
  10. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/false.d.ts.map +1 -1
  11. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/greater.d.ts.map +1 -1
  12. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/greater_or_equal.d.ts.map +1 -1
  13. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/instance_of.d.ts.map +1 -1
  14. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/is_error.d.ts.map +1 -1
  15. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/less.d.ts.map +1 -1
  16. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/less_or_equal.d.ts.map +1 -1
  17. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/match.d.ts.map +1 -1
  18. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/mod.d.ts.map +1 -1
  19. package/esm/deps/jsr.io/@std/assert/1.0.19/not_equals.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/not_instance_of.d.ts.map +1 -1
  21. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/not_match.d.ts.map +1 -1
  22. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/not_strict_equals.d.ts.map +1 -1
  23. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/object_match.d.ts.map +1 -1
  24. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/rejects.d.ts.map +1 -1
  25. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/strict_equals.d.ts.map +1 -1
  26. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/string_includes.d.ts.map +1 -1
  27. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/throws.d.ts.map +1 -1
  28. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/unimplemented.d.ts.map +1 -1
  29. package/esm/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/unreachable.d.ts.map +1 -1
  30. package/esm/lib/rs_lib.internal.d.ts +934 -950
  31. package/esm/lib/rs_lib.internal.d.ts.map +1 -1
  32. package/esm/lib/rs_lib.internal.js +1865 -1842
  33. package/esm/lib/rs_lib.js +3889 -3583
  34. package/esm/mod.d.ts +9 -21
  35. package/esm/mod.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/script/deps/jsr.io/@std/assert/1.0.19/almost_equals.d.ts.map +1 -0
  38. package/script/deps/jsr.io/@std/assert/1.0.19/array_includes.d.ts.map +1 -0
  39. package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
  40. package/{esm/deps/jsr.io/@std/assert/1.0.16 → script/deps/jsr.io/@std/assert/1.0.19}/assertion_error.d.ts.map +1 -1
  41. package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
  42. package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
  43. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/exists.d.ts.map +1 -1
  44. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/fail.d.ts.map +1 -1
  45. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/false.d.ts.map +1 -1
  46. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/greater.d.ts.map +1 -1
  47. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/greater_or_equal.d.ts.map +1 -1
  48. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/instance_of.d.ts.map +1 -1
  49. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/is_error.d.ts.map +1 -1
  50. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/less.d.ts.map +1 -1
  51. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/less_or_equal.d.ts.map +1 -1
  52. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/match.d.ts.map +1 -1
  53. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/mod.d.ts.map +1 -1
  54. package/script/deps/jsr.io/@std/assert/1.0.19/not_equals.d.ts.map +1 -0
  55. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/not_instance_of.d.ts.map +1 -1
  56. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/not_match.d.ts.map +1 -1
  57. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/not_strict_equals.d.ts.map +1 -1
  58. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/object_match.d.ts.map +1 -1
  59. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/rejects.d.ts.map +1 -1
  60. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/strict_equals.d.ts.map +1 -1
  61. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/string_includes.d.ts.map +1 -1
  62. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/throws.d.ts.map +1 -1
  63. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/unimplemented.d.ts.map +1 -1
  64. package/script/deps/jsr.io/@std/assert/{1.0.16 → 1.0.19}/unreachable.d.ts.map +1 -1
  65. package/script/lib/rs_lib.internal.d.ts +934 -950
  66. package/script/lib/rs_lib.internal.d.ts.map +1 -1
  67. package/script/lib/rs_lib.internal.js +1904 -1881
  68. package/script/lib/rs_lib.js +3889 -3583
  69. package/script/mod.d.ts +9 -21
  70. package/script/mod.d.ts.map +1 -1
  71. package/esm/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts.map +0 -1
  72. package/esm/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts.map +0 -1
  73. package/esm/deps/jsr.io/@std/assert/1.0.16/assert.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +0 -1
  75. package/esm/deps/jsr.io/@std/assert/1.0.16/equals.d.ts.map +0 -1
  76. package/esm/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts.map +0 -1
  77. package/script/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts.map +0 -1
  78. package/script/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts.map +0 -1
  79. package/script/deps/jsr.io/@std/assert/1.0.16/assert.d.ts.map +0 -1
  80. package/script/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +0 -1
  81. package/script/deps/jsr.io/@std/assert/1.0.16/equals.d.ts.map +0 -1
  82. package/script/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts.map +0 -1
@@ -5,18 +5,10 @@ export function __wbg_set_wasm(val: any): void;
5
5
  * @param options - Optional parsing options
6
6
  * @returns The root node of the parsed CST
7
7
  * @param {string} text
8
- * @param {{ allowComments?: boolean; allowTrailingCommas?: boolean; allowLooseObjectPropertyNames?: boolean; allowMissingCommas?: boolean; allowSingleQuotedStrings?: boolean; allowHexadecimalNumbers?: boolean; allowUnaryPlusNumbers?: boolean; } | null} [options]
8
+ * @param {ParseOptions | null} [options]
9
9
  * @returns {RootNode}
10
10
  */
11
- export function parse(text: string, options?: {
12
- allowComments?: boolean;
13
- allowTrailingCommas?: boolean;
14
- allowLooseObjectPropertyNames?: boolean;
15
- allowMissingCommas?: boolean;
16
- allowSingleQuotedStrings?: boolean;
17
- allowHexadecimalNumbers?: boolean;
18
- allowUnaryPlusNumbers?: boolean;
19
- } | null): any;
11
+ export function parse(text: string, options?: ParseOptions | null): any;
20
12
  /**
21
13
  * Parses a JSONC (JSON with Comments) string directly to a JavaScript object.
22
14
  * @param text - The JSONC text to parse
@@ -24,61 +16,53 @@ export function parse(text: string, options?: {
24
16
  * @returns The plain JavaScript value (object, array, string, number, boolean, or null)
25
17
  * @throws If the text cannot be parsed or converted
26
18
  * @param {string} text
27
- * @param {{ allowComments?: boolean; allowTrailingCommas?: boolean; allowLooseObjectPropertyNames?: boolean; allowMissingCommas?: boolean; allowSingleQuotedStrings?: boolean; allowHexadecimalNumbers?: boolean; allowUnaryPlusNumbers?: boolean; } | null} [options]
19
+ * @param {ParseOptions | null} [options]
28
20
  * @returns {any}
29
21
  */
30
- export function parseToValue(text: string, options?: {
31
- allowComments?: boolean;
32
- allowTrailingCommas?: boolean;
33
- allowLooseObjectPropertyNames?: boolean;
34
- allowMissingCommas?: boolean;
35
- allowSingleQuotedStrings?: boolean;
36
- allowHexadecimalNumbers?: boolean;
37
- allowUnaryPlusNumbers?: boolean;
38
- } | null): any;
39
- export function __wbg_Error_90f14b053b2af32f(arg0: any, arg1: any): Error;
22
+ export function parseToValue(text: string, options?: ParseOptions | null): any;
23
+ export function __wbg_Error_52673b7de5a0ca89(arg0: any, arg1: any): Error;
40
24
  export function __wbg_String_8f0eb39a4a4c2f66(arg0: any, arg1: any): void;
41
- export function __wbg_call_90bf4b9978d51034(...args: any[]): any;
42
- export function __wbg_done_73bb10bcf6e0c339(arg0: any): any;
43
- export function __wbg_entries_4f3de4ccde51d587(arg0: any): [string, any][];
44
- export function __wbg_get_6e64f6b3af0c61a2(arg0: any, arg1: any): any;
45
- export function __wbg_get_bb21663672334172(...args: any[]): any;
46
- export function __wbg_instanceof_ArrayBuffer_625e762023eb35cf(arg0: any): boolean;
47
- export function __wbg_instanceof_Map_7d3de120a6cca988(arg0: any): boolean;
48
- export function __wbg_instanceof_Uint8Array_6935b7b95ef40080(arg0: any): boolean;
49
- export function __wbg_isArray_fe31d4a8d77ae781(arg0: any): arg0 is any[];
50
- export function __wbg_isSafeInteger_342db8cae87edb4e(arg0: any): boolean;
51
- export function __wbg_iterator_fe047a6b04943f88(): symbol;
52
- export function __wbg_length_09646ad20ebb8534(arg0: any): any;
53
- export function __wbg_length_537fa63a6103cbdb(arg0: any): any;
54
- export function __wbg_new_1b925e0c0e1d30ba(): Object;
55
- export function __wbg_new_3c48ee6a683248da(): Map<any, any>;
56
- export function __wbg_new_7c134f9c83abf3a4(arg0: any, arg1: any): Error;
57
- export function __wbg_new_d6b08dae7359cebb(arg0: any): Uint8Array<any>;
58
- export function __wbg_new_d8a154d0939e6bb4(): any[];
59
- export function __wbg_next_59846e169128a0ea(arg0: any): any;
60
- export function __wbg_next_c782e76a0400870a(...args: any[]): any;
25
+ export function __wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d(arg0: any, arg1: any): void;
26
+ export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0: any): 0 | 1 | 16777215;
27
+ export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0: any, arg1: any): void;
28
+ export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0: any, arg1: any): boolean;
29
+ export function __wbg___wbindgen_is_bigint_0e1a2e3f55cfae27(arg0: any): arg0 is bigint;
30
+ export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0: any): boolean;
31
+ export function __wbg___wbindgen_is_object_ce774f3490692386(arg0: any): boolean;
32
+ export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0: any): arg0 is string;
33
+ export function __wbg___wbindgen_jsval_eq_b6101cc9cef1fe36(arg0: any, arg1: any): boolean;
34
+ export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0: any, arg1: any): boolean;
35
+ export function __wbg___wbindgen_number_get_9619185a74197f95(arg0: any, arg1: any): void;
36
+ export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0: any, arg1: any): void;
37
+ export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0: any, arg1: any): void;
38
+ export function __wbg_call_abb4ff46ce38be40(...args: any[]): any;
39
+ export function __wbg_done_62ea16af4ce34b24(arg0: any): any;
40
+ export function __wbg_entries_83c79938054e065f(arg0: any): [string, any][];
41
+ export function __wbg_get_6b7bd52aca3f9671(arg0: any, arg1: any): any;
42
+ export function __wbg_get_af9dab7e9603ea93(...args: any[]): any;
43
+ export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0: any): boolean;
44
+ export function __wbg_instanceof_Map_084be8da74364158(arg0: any): boolean;
45
+ export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0: any): boolean;
46
+ export function __wbg_isArray_51fd9e6422c0a395(arg0: any): arg0 is any[];
47
+ export function __wbg_isSafeInteger_ae7d3f054d55fa16(arg0: any): boolean;
48
+ export function __wbg_iterator_27b7c8b35ab3e86b(): symbol;
49
+ export function __wbg_length_22ac23eaec9d8053(arg0: any): any;
50
+ export function __wbg_length_d45040a40c570362(arg0: any): any;
51
+ export function __wbg_new_1ba21ce319a06297(): Object;
52
+ export function __wbg_new_25f239778d6112b9(): any[];
53
+ export function __wbg_new_6421f6084cc5bc5a(arg0: any): Uint8Array<any>;
54
+ export function __wbg_new_b546ae120718850e(): Map<any, any>;
55
+ export function __wbg_new_df1173567d5ff028(arg0: any, arg1: any): Error;
56
+ export function __wbg_next_138a17bbf04e926c(arg0: any): any;
57
+ export function __wbg_next_3cfe5c0fe2a4cc53(...args: any[]): any;
61
58
  export function __wbg_node_new(arg0: any): any;
62
59
  export function __wbg_objectprop_new(arg0: any): any;
63
- export function __wbg_prototypesetcall_a81ac58a5b6e988c(arg0: any, arg1: any, arg2: any): void;
64
- export function __wbg_set_038a8a067d895c6a(arg0: any, arg1: any, arg2: any): void;
60
+ export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0: any, arg1: any, arg2: any): void;
65
61
  export function __wbg_set_3f1d0b984ed272ed(arg0: any, arg1: any, arg2: any): void;
66
- export function __wbg_set_a15b7b524330d4f1(arg0: any, arg1: any, arg2: any): any;
67
- export function __wbg_value_4ae21701b6f5c482(arg0: any): any;
68
- export function __wbg_wbindgenbigintgetasi64_d3d568a64e846827(arg0: any, arg1: any): void;
69
- export function __wbg_wbindgenbooleanget_527bfac1bf7c06df(arg0: any): 0 | 1 | 16777215;
70
- export function __wbg_wbindgendebugstring_0c28a61befa1f3ce(arg0: any, arg1: any): void;
71
- export function __wbg_wbindgenin_ed944d66e9a43ef2(arg0: any, arg1: any): boolean;
72
- export function __wbg_wbindgenisbigint_1a3fbe7ad37b3968(arg0: any): arg0 is bigint;
73
- export function __wbg_wbindgenisfunction_27a5c72d80bbdf07(arg0: any): boolean;
74
- export function __wbg_wbindgenisobject_bdb9aa7f2dd707ef(arg0: any): boolean;
75
- export function __wbg_wbindgenisstring_55b63daa584dc807(arg0: any): arg0 is string;
76
- export function __wbg_wbindgenjsvaleq_af67af1ed6574f4f(arg0: any, arg1: any): boolean;
77
- export function __wbg_wbindgenjsvallooseeq_4f1ced8136023b79(arg0: any, arg1: any): boolean;
78
- export function __wbg_wbindgennumberget_41a5988c9fc46eeb(arg0: any, arg1: any): void;
79
- export function __wbg_wbindgenstringget_c45e0c672ada3c64(arg0: any, arg1: any): void;
80
- export function __wbg_wbindgenthrow_681185b504fabc8e(arg0: any, arg1: any): void;
81
- export function __wbindgen_cast_2241b6af4c4b2941(arg0: any, arg1: any): any;
62
+ export function __wbg_set_7df433eea03a5c14(arg0: any, arg1: any, arg2: any): void;
63
+ export function __wbg_set_efaaf145b9377369(arg0: any, arg1: any, arg2: any): any;
64
+ export function __wbg_value_57b7b035e117f7ee(arg0: any): any;
65
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0: any, arg1: any): string;
82
66
  export function __wbindgen_cast_4625c577ab2ec9ee(arg0: any): bigint;
83
67
  export function __wbindgen_cast_9ae0607507abb057(arg0: any): any;
84
68
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0: any): any;
@@ -93,17 +77,23 @@ export class BooleanLit {
93
77
  __wbg_ptr: number | undefined;
94
78
  free(): void;
95
79
  /**
96
- * Returns the boolean value (true or false).
97
- * @returns The boolean value
98
- * @returns {boolean}
80
+ * Returns the index of this node within its parent's children.
81
+ * @returns The child index
82
+ * @returns {number}
99
83
  */
100
- value(): boolean;
84
+ childIndex(): number;
101
85
  /**
102
- * Sets the boolean value.
103
- * @param value - The new boolean value (true or false)
104
- * @param {boolean} value
86
+ * Returns the indentation string used at this node's depth.
87
+ * @returns The indentation string, or undefined if not applicable
88
+ * @returns {string | undefined}
105
89
  */
106
- setValue(value: boolean): void;
90
+ indentText(): string | undefined;
91
+ /**
92
+ * Returns the next sibling node.
93
+ * @returns The next sibling, or undefined if this is the last child
94
+ * @returns {Node | undefined}
95
+ */
96
+ nextSibling(): any;
107
97
  /**
108
98
  * Replaces this boolean literal with a new value.
109
99
  * @param replacement - The new value to replace this boolean with
@@ -113,28 +103,11 @@ export class BooleanLit {
113
103
  */
114
104
  replaceWith(replacement: any): any;
115
105
  /**
116
- * Removes this node from its parent.
117
- * After calling this method, the node is detached from the CST and can no longer be used.
118
- */
119
- remove(): void;
120
- /**
121
- * Returns the parent node in the CST.
122
- * @returns The parent node, or undefined if this is the root
123
- * @returns {Node | undefined}
124
- */
125
- parent(): any;
126
- /**
127
- * Returns all ancestor nodes from parent to root.
128
- * @returns Array of ancestor nodes
106
+ * Returns all next sibling nodes.
107
+ * @returns Array of next siblings
129
108
  * @returns {Node[]}
130
109
  */
131
- ancestors(): any[];
132
- /**
133
- * Returns the index of this node within its parent's children.
134
- * @returns The child index
135
- * @returns {number}
136
- */
137
- childIndex(): number;
110
+ nextSiblings(): any[];
138
111
  /**
139
112
  * Returns the previous sibling node.
140
113
  * @returns The previous sibling, or undefined if this is the first child
@@ -148,17 +121,34 @@ export class BooleanLit {
148
121
  */
149
122
  previousSiblings(): any[];
150
123
  /**
151
- * Returns the next sibling node.
152
- * @returns The next sibling, or undefined if this is the last child
124
+ * Returns whether this node's container uses trailing commas.
125
+ * @returns true if trailing commas are used
126
+ * @returns {boolean}
127
+ */
128
+ usesTrailingCommas(): boolean;
129
+ /**
130
+ * Returns the boolean value (true or false).
131
+ * @returns The boolean value
132
+ * @returns {boolean}
133
+ */
134
+ value(): boolean;
135
+ /**
136
+ * Returns the parent node in the CST.
137
+ * @returns The parent node, or undefined if this is the root
153
138
  * @returns {Node | undefined}
154
139
  */
155
- nextSibling(): any;
140
+ parent(): any;
156
141
  /**
157
- * Returns all next sibling nodes.
158
- * @returns Array of next siblings
142
+ * Removes this node from its parent.
143
+ * After calling this method, the node is detached from the CST and can no longer be used.
144
+ */
145
+ remove(): void;
146
+ /**
147
+ * Returns all ancestor nodes from parent to root.
148
+ * @returns Array of ancestor nodes
159
149
  * @returns {Node[]}
160
150
  */
161
- nextSiblings(): any[];
151
+ ancestors(): any[];
162
152
  /**
163
153
  * Returns the root node of the document.
164
154
  * @returns The root node, or undefined if detached
@@ -166,17 +156,11 @@ export class BooleanLit {
166
156
  */
167
157
  rootNode(): any;
168
158
  /**
169
- * Returns the indentation string used at this node's depth.
170
- * @returns The indentation string, or undefined if not applicable
171
- * @returns {string | undefined}
172
- */
173
- indentText(): any;
174
- /**
175
- * Returns whether this node's container uses trailing commas.
176
- * @returns true if trailing commas are used
177
- * @returns {boolean}
159
+ * Sets the boolean value.
160
+ * @param value - The new boolean value (true or false)
161
+ * @param {boolean} value
178
162
  */
179
- usesTrailingCommas(): boolean;
163
+ setValue(value: boolean): void;
180
164
  }
181
165
  /**
182
166
  * Represents a JSON array node in the CST.
@@ -188,26 +172,80 @@ export class JsonArray {
188
172
  __wbg_ptr: number | undefined;
189
173
  free(): void;
190
174
  /**
191
- * Returns all element nodes in the array.
192
- * @returns Array of element nodes
175
+ * Returns the index of this node within its parent's children.
176
+ * @returns The child index
177
+ * @returns {number}
178
+ */
179
+ childIndex(): number;
180
+ /**
181
+ * Returns the indentation string used at this node's depth.
182
+ * @returns The indentation string, or undefined if not applicable
183
+ * @returns {string | undefined}
184
+ */
185
+ indentText(): string | undefined;
186
+ /**
187
+ * Returns the next sibling node.
188
+ * @returns The next sibling, or undefined if this is the last child
189
+ * @returns {Node | undefined}
190
+ */
191
+ nextSibling(): any;
192
+ /**
193
+ * Replaces this array with a new value.
194
+ * @param value - The new value to replace this array with
195
+ * @returns The new node that replaced this one, or undefined if this was the root value
196
+ * @param {any} value
197
+ * @returns {Node | undefined}
198
+ */
199
+ replaceWith(value: any): any;
200
+ /**
201
+ * Returns all next sibling nodes.
202
+ * @returns Array of next siblings
193
203
  * @returns {Node[]}
194
204
  */
195
- elements(): any[];
205
+ nextSiblings(): any[];
196
206
  /**
197
- * Removes this array from its parent.
198
- * After calling this method, the array is detached from the CST and can no longer be used.
207
+ * Returns the child node at the specified index.
208
+ * @param index - The child index
209
+ * @returns The child node, or undefined if index is out of bounds
210
+ * @param {number} index
211
+ * @returns {Node | undefined}
199
212
  */
200
- remove(): void;
213
+ childAtIndex(index: number): any;
201
214
  /**
202
215
  * Ensures the array is formatted with each element on its own line.
203
216
  */
204
217
  ensureMultiline(): void;
205
218
  /**
206
- * Returns all child nodes including whitespace and punctuation.
207
- * @returns Array of all child nodes
219
+ * Returns the previous sibling node.
220
+ * @returns The previous sibling, or undefined if this is the first child
221
+ * @returns {Node | undefined}
222
+ */
223
+ previousSibling(): any;
224
+ /**
225
+ * Returns all previous sibling nodes.
226
+ * @returns Array of previous siblings
208
227
  * @returns {Node[]}
209
228
  */
210
- children(): any[];
229
+ previousSiblings(): any[];
230
+ /**
231
+ * Configures whether trailing commas should be used in this array.
232
+ * When enabled, trailing commas are added for multiline formatting.
233
+ * @param enabled - Whether to enable trailing commas
234
+ * @param {boolean} enabled
235
+ */
236
+ setTrailingCommas(enabled: boolean): void;
237
+ /**
238
+ * Returns whether this node's container uses trailing commas.
239
+ * @returns true if trailing commas are used
240
+ * @returns {boolean}
241
+ */
242
+ usesTrailingCommas(): boolean;
243
+ /**
244
+ * Returns child nodes excluding whitespace, comments, and punctuation.
245
+ * @returns Array of significant child nodes
246
+ * @returns {Node[]}
247
+ */
248
+ childrenExcludeTriviaAndTokens(): any[];
211
249
  /**
212
250
  * Appends a new element to the end of the array.
213
251
  * @param value - The value to append
@@ -226,21 +264,6 @@ export class JsonArray {
226
264
  * @returns {Node}
227
265
  */
228
266
  insert(index: number, value: any): any;
229
- /**
230
- * Configures whether trailing commas should be used in this array.
231
- * When enabled, trailing commas are added for multiline formatting.
232
- * @param enabled - Whether to enable trailing commas
233
- * @param {boolean} enabled
234
- */
235
- setTrailingCommas(enabled: boolean): void;
236
- /**
237
- * Replaces this array with a new value.
238
- * @param value - The new value to replace this array with
239
- * @returns The new node that replaced this one, or undefined if this was the root value
240
- * @param {any} value
241
- * @returns {Node | undefined}
242
- */
243
- replaceWith(value: any): any;
244
267
  /**
245
268
  * Returns the parent node in the CST.
246
269
  * @returns The parent node, or undefined if this is the root
@@ -248,73 +271,34 @@ export class JsonArray {
248
271
  */
249
272
  parent(): any;
250
273
  /**
251
- * Returns the index of this node within its parent's children.
252
- * @returns The child index
253
- * @returns {number}
274
+ * Removes this array from its parent.
275
+ * After calling this method, the array is detached from the CST and can no longer be used.
254
276
  */
255
- childIndex(): number;
277
+ remove(): void;
256
278
  /**
257
- * Returns all ancestor nodes from parent to root.
258
- * @returns Array of ancestor nodes
279
+ * Returns all child nodes including whitespace and punctuation.
280
+ * @returns Array of all child nodes
259
281
  * @returns {Node[]}
260
282
  */
261
- ancestors(): any[];
262
- /**
263
- * Returns the previous sibling node.
264
- * @returns The previous sibling, or undefined if this is the first child
265
- * @returns {Node | undefined}
266
- */
267
- previousSibling(): any;
283
+ children(): any[];
268
284
  /**
269
- * Returns all previous sibling nodes.
270
- * @returns Array of previous siblings
285
+ * Returns all element nodes in the array.
286
+ * @returns Array of element nodes
271
287
  * @returns {Node[]}
272
288
  */
273
- previousSiblings(): any[];
274
- /**
275
- * Returns the next sibling node.
276
- * @returns The next sibling, or undefined if this is the last child
277
- * @returns {Node | undefined}
278
- */
279
- nextSibling(): any;
289
+ elements(): any[];
280
290
  /**
281
- * Returns all next sibling nodes.
282
- * @returns Array of next siblings
291
+ * Returns all ancestor nodes from parent to root.
292
+ * @returns Array of ancestor nodes
283
293
  * @returns {Node[]}
284
294
  */
285
- nextSiblings(): any[];
295
+ ancestors(): any[];
286
296
  /**
287
297
  * Returns the root node of the document.
288
298
  * @returns The root node, or undefined if detached
289
299
  * @returns {RootNode | undefined}
290
300
  */
291
301
  rootNode(): any;
292
- /**
293
- * Returns the indentation string used at this node's depth.
294
- * @returns The indentation string, or undefined if not applicable
295
- * @returns {string | undefined}
296
- */
297
- indentText(): any;
298
- /**
299
- * Returns whether this node's container uses trailing commas.
300
- * @returns true if trailing commas are used
301
- * @returns {boolean}
302
- */
303
- usesTrailingCommas(): boolean;
304
- /**
305
- * Returns child nodes excluding whitespace, comments, and punctuation.
306
- * @returns Array of significant child nodes
307
- * @returns {Node[]}
308
- */
309
- childrenExcludeTriviaAndTokens(): any[];
310
- /**
311
- * Returns the child node at the specified index.
312
- * @param index - The child index
313
- * @returns The child node, or undefined if index is out of bounds
314
- * @param {number} index
315
- * @returns {Node | undefined}
316
- */
317
- childAtIndex(index: number): any;
318
302
  }
319
303
  /**
320
304
  * Represents a JSON object node in the CST.
@@ -332,24 +316,50 @@ export class JsonObject {
332
316
  */
333
317
  properties(): any[];
334
318
  /**
335
- * Gets a property by name.
336
- * @param key - The property name to look up
337
- * @returns The property, or undefined if not found
338
- * @param {string} key
339
- * @returns {ObjectProp | undefined}
319
+ * Returns the index of this node within its parent's children.
320
+ * @returns The child index
321
+ * @returns {number}
340
322
  */
341
- get(key: string): any;
323
+ childIndex(): number;
342
324
  /**
343
- * Gets a property by name, throwing if not found.
344
- * @param key - The property name to look up
345
- * @returns The property
346
- * @throws If the property is not found
347
- * @param {string} key
348
- * @returns {ObjectProp}
325
+ * Returns the indentation string used at this node's depth.
326
+ * @returns The indentation string, or undefined if not applicable
327
+ * @returns {string | undefined}
349
328
  */
350
- getOrThrow(key: string): any;
329
+ indentText(): string | undefined;
351
330
  /**
352
- * Gets a property value if it's an object.
331
+ * Gets a property value if it's an array.
332
+ * @param name - The property name to look up
333
+ * @returns The array value, or undefined if property doesn't exist or is not an array
334
+ * @param {string} name
335
+ * @returns {JsonArray | undefined}
336
+ */
337
+ getIfArray(name: string): any;
338
+ /**
339
+ * Gets a property by name, throwing if not found.
340
+ * @param key - The property name to look up
341
+ * @returns The property
342
+ * @throws If the property is not found
343
+ * @param {string} key
344
+ * @returns {ObjectProp}
345
+ */
346
+ getOrThrow(key: string): any;
347
+ /**
348
+ * Returns the next sibling node.
349
+ * @returns The next sibling, or undefined if this is the last child
350
+ * @returns {Node | undefined}
351
+ */
352
+ nextSibling(): any;
353
+ /**
354
+ * Replaces this object with a new value.
355
+ * @param replacement - The new value to replace this object with
356
+ * @returns The new node that replaced this one, or undefined if this was the root value
357
+ * @param {any} replacement
358
+ * @returns {Node | undefined}
359
+ */
360
+ replaceWith(replacement: any): any;
361
+ /**
362
+ * Gets a property value if it's an object.
353
363
  * @param name - The property name to look up
354
364
  * @returns The object value, or undefined if property doesn't exist or is not an object
355
365
  * @param {string} name
@@ -357,40 +367,57 @@ export class JsonObject {
357
367
  */
358
368
  getIfObject(name: string): any;
359
369
  /**
360
- * Gets a property value as an object, throwing if not found or wrong type.
361
- * @param name - The property name to look up
362
- * @returns The object value
363
- * @throws If the property doesn't exist or is not an object
364
- * @param {string} name
365
- * @returns {JsonObject}
370
+ * Returns all next sibling nodes.
371
+ * @returns Array of next siblings
372
+ * @returns {Node[]}
366
373
  */
367
- getIfObjectOrThrow(name: string): any;
374
+ nextSiblings(): any[];
368
375
  /**
369
- * Gets a property value as an object, creating an empty object if the property doesn't exist.
370
- * Returns undefined if the property exists but has a non-object value.
371
- * @param name - The property name to get
372
- * @returns The object value, or undefined if property has a non-object value
373
- * @param {string} name
374
- * @returns {JsonObject | undefined}
376
+ * Returns the child node at the specified index.
377
+ * @param index - The child index
378
+ * @returns The child node, or undefined if index is out of bounds
379
+ * @param {number} index
380
+ * @returns {Node | undefined}
375
381
  */
376
- getIfObjectOrCreate(name: string): any;
382
+ childAtIndex(index: number): any;
377
383
  /**
378
- * Gets a property value as an object, creating or replacing the value with an empty object if needed.
379
- * Unlike getIfObjectOrCreate, this always returns an object by replacing non-object values.
380
- * @param name - The property name to get
381
- * @returns The object value (always succeeds)
382
- * @param {string} name
383
- * @returns {JsonObject}
384
+ * Ensures the object is formatted with each property on its own line.
384
385
  */
385
- getIfObjectOrForce(name: string): any;
386
+ ensureMultiline(): void;
386
387
  /**
387
- * Gets a property value if it's an array.
388
- * @param name - The property name to look up
389
- * @returns The array value, or undefined if property doesn't exist or is not an array
388
+ * Returns the previous sibling node.
389
+ * @returns The previous sibling, or undefined if this is the first child
390
+ * @returns {Node | undefined}
391
+ */
392
+ previousSibling(): any;
393
+ /**
394
+ * Returns all previous sibling nodes.
395
+ * @returns Array of previous siblings
396
+ * @returns {Node[]}
397
+ */
398
+ previousSiblings(): any[];
399
+ /**
400
+ * Configures whether trailing commas should be used in this object.
401
+ * When enabled, trailing commas are added for multiline formatting.
402
+ * @param enabled - Whether to enable trailing commas
403
+ * @param {boolean} enabled
404
+ */
405
+ setTrailingCommas(enabled: boolean): void;
406
+ /**
407
+ * Returns whether this node's container uses trailing commas.
408
+ * @returns true if trailing commas are used
409
+ * @returns {boolean}
410
+ */
411
+ usesTrailingCommas(): boolean;
412
+ /**
413
+ * Gets a property value as an array, creating or replacing the value with an empty array if needed.
414
+ * Unlike getIfArrayOrCreate, this always returns an array by replacing non-array values.
415
+ * @param name - The property name to get
416
+ * @returns The array value (always succeeds)
390
417
  * @param {string} name
391
- * @returns {JsonArray | undefined}
418
+ * @returns {JsonArray}
392
419
  */
393
- getIfArray(name: string): any;
420
+ getIfArrayOrForce(name: string): any;
394
421
  /**
395
422
  * Gets a property value as an array, throwing if not found or wrong type.
396
423
  * @param name - The property name to look up
@@ -410,25 +437,46 @@ export class JsonObject {
410
437
  */
411
438
  getIfArrayOrCreate(name: string): any;
412
439
  /**
413
- * Gets a property value as an array, creating or replacing the value with an empty array if needed.
414
- * Unlike getIfArrayOrCreate, this always returns an array by replacing non-array values.
440
+ * Gets a property value as an object, creating or replacing the value with an empty object if needed.
441
+ * Unlike getIfObjectOrCreate, this always returns an object by replacing non-object values.
415
442
  * @param name - The property name to get
416
- * @returns The array value (always succeeds)
443
+ * @returns The object value (always succeeds)
417
444
  * @param {string} name
418
- * @returns {JsonArray}
445
+ * @returns {JsonObject}
419
446
  */
420
- getIfArrayOrForce(name: string): any;
447
+ getIfObjectOrForce(name: string): any;
421
448
  /**
422
- * Removes this object from its parent.
423
- * After calling this method, the object is detached from the CST and can no longer be used.
449
+ * Gets a property value as an object, throwing if not found or wrong type.
450
+ * @param name - The property name to look up
451
+ * @returns The object value
452
+ * @throws If the property doesn't exist or is not an object
453
+ * @param {string} name
454
+ * @returns {JsonObject}
424
455
  */
425
- remove(): void;
456
+ getIfObjectOrThrow(name: string): any;
426
457
  /**
427
- * Returns all child nodes including whitespace and punctuation.
428
- * @returns Array of all child nodes
458
+ * Gets a property value as an object, creating an empty object if the property doesn't exist.
459
+ * Returns undefined if the property exists but has a non-object value.
460
+ * @param name - The property name to get
461
+ * @returns The object value, or undefined if property has a non-object value
462
+ * @param {string} name
463
+ * @returns {JsonObject | undefined}
464
+ */
465
+ getIfObjectOrCreate(name: string): any;
466
+ /**
467
+ * Returns child nodes excluding whitespace, comments, and punctuation.
468
+ * @returns Array of significant child nodes
429
469
  * @returns {Node[]}
430
470
  */
431
- children(): any[];
471
+ childrenExcludeTriviaAndTokens(): any[];
472
+ /**
473
+ * Gets a property by name.
474
+ * @param key - The property name to look up
475
+ * @returns The property, or undefined if not found
476
+ * @param {string} key
477
+ * @returns {ObjectProp | undefined}
478
+ */
479
+ get(key: string): any;
432
480
  /**
433
481
  * Appends a new property to the object.
434
482
  * @param key - The name of the property to add
@@ -451,25 +499,6 @@ export class JsonObject {
451
499
  * @returns {ObjectProp}
452
500
  */
453
501
  insert(index: number, key: string, value: any): any;
454
- /**
455
- * Configures whether trailing commas should be used in this object.
456
- * When enabled, trailing commas are added for multiline formatting.
457
- * @param enabled - Whether to enable trailing commas
458
- * @param {boolean} enabled
459
- */
460
- setTrailingCommas(enabled: boolean): void;
461
- /**
462
- * Ensures the object is formatted with each property on its own line.
463
- */
464
- ensureMultiline(): void;
465
- /**
466
- * Replaces this object with a new value.
467
- * @param replacement - The new value to replace this object with
468
- * @returns The new node that replaced this one, or undefined if this was the root value
469
- * @param {any} replacement
470
- * @returns {Node | undefined}
471
- */
472
- replaceWith(replacement: any): any;
473
502
  /**
474
503
  * Returns the parent node in the CST.
475
504
  * @returns The parent node, or undefined if this is the root
@@ -477,73 +506,28 @@ export class JsonObject {
477
506
  */
478
507
  parent(): any;
479
508
  /**
480
- * Returns all ancestor nodes from parent to root.
481
- * @returns Array of ancestor nodes
482
- * @returns {Node[]}
483
- */
484
- ancestors(): any[];
485
- /**
486
- * Returns the index of this node within its parent's children.
487
- * @returns The child index
488
- * @returns {number}
489
- */
490
- childIndex(): number;
491
- /**
492
- * Returns the previous sibling node.
493
- * @returns The previous sibling, or undefined if this is the first child
494
- * @returns {Node | undefined}
509
+ * Removes this object from its parent.
510
+ * After calling this method, the object is detached from the CST and can no longer be used.
495
511
  */
496
- previousSibling(): any;
512
+ remove(): void;
497
513
  /**
498
- * Returns all previous sibling nodes.
499
- * @returns Array of previous siblings
514
+ * Returns all child nodes including whitespace and punctuation.
515
+ * @returns Array of all child nodes
500
516
  * @returns {Node[]}
501
517
  */
502
- previousSiblings(): any[];
503
- /**
504
- * Returns the next sibling node.
505
- * @returns The next sibling, or undefined if this is the last child
506
- * @returns {Node | undefined}
507
- */
508
- nextSibling(): any;
518
+ children(): any[];
509
519
  /**
510
- * Returns all next sibling nodes.
511
- * @returns Array of next siblings
520
+ * Returns all ancestor nodes from parent to root.
521
+ * @returns Array of ancestor nodes
512
522
  * @returns {Node[]}
513
523
  */
514
- nextSiblings(): any[];
524
+ ancestors(): any[];
515
525
  /**
516
526
  * Returns the root node of the document.
517
527
  * @returns The root node, or undefined if detached
518
528
  * @returns {RootNode | undefined}
519
529
  */
520
530
  rootNode(): any;
521
- /**
522
- * Returns the indentation string used at this node's depth.
523
- * @returns The indentation string, or undefined if not applicable
524
- * @returns {string | undefined}
525
- */
526
- indentText(): any;
527
- /**
528
- * Returns whether this node's container uses trailing commas.
529
- * @returns true if trailing commas are used
530
- * @returns {boolean}
531
- */
532
- usesTrailingCommas(): boolean;
533
- /**
534
- * Returns child nodes excluding whitespace, comments, and punctuation.
535
- * @returns Array of significant child nodes
536
- * @returns {Node[]}
537
- */
538
- childrenExcludeTriviaAndTokens(): any[];
539
- /**
540
- * Returns the child node at the specified index.
541
- * @param index - The child index
542
- * @returns The child node, or undefined if index is out of bounds
543
- * @param {number} index
544
- * @returns {Node | undefined}
545
- */
546
- childAtIndex(index: number): any;
547
531
  }
548
532
  /**
549
533
  * Represents a generic node in the CST.
@@ -555,49 +539,53 @@ export class Node {
555
539
  __wbg_ptr: number | undefined;
556
540
  free(): void;
557
541
  /**
558
- * Removes this node from its parent.
559
- * Works for any node kind, including whitespace, comments, tokens, containers, and leaf values.
560
- * After calling this method, the node is detached from the CST and can no longer be used.
542
+ * Returns the boolean value if this node is a boolean literal.
543
+ * @returns The boolean value, or undefined if this node is not a boolean
544
+ * @returns {boolean | undefined}
561
545
  */
562
- remove(): void;
546
+ asBoolean(): boolean | undefined;
563
547
  /**
564
- * Returns true if this node is a container (object, array, or property).
565
- * @returns true if this is a container node
548
+ * Returns true if this node is a boolean literal.
549
+ * @returns true if this node is a boolean
566
550
  * @returns {boolean}
567
551
  */
568
- isContainer(): boolean;
552
+ isBoolean(): boolean;
569
553
  /**
570
- * Returns true if this node is a leaf value (string, number, boolean, null).
571
- * @returns true if this is a leaf node
554
+ * Returns true if this node is a comment.
555
+ * @returns true if this node is a comment
572
556
  * @returns {boolean}
573
557
  */
574
- isLeaf(): boolean;
558
+ isComment(): boolean;
575
559
  /**
576
- * Converts this node to an object if it is one.
577
- * @returns The object, or undefined if this node is not an object
578
- * @returns {JsonObject | undefined}
560
+ * Returns true if this node is a newline character.
561
+ * @returns true if this node is a newline
562
+ * @returns {boolean}
579
563
  */
580
- asObject(): any;
564
+ isNewline(): boolean;
581
565
  /**
582
- * Converts this node to an object, throwing if it's not an object.
583
- * @returns The object
584
- * @throws If this node is not an object
585
- * @returns {JsonObject}
566
+ * Returns the character if this node is a single-character token.
567
+ * @returns The token character, or undefined if not a token
568
+ * @returns {string | undefined}
586
569
  */
587
- asObjectOrThrow(): any;
570
+ tokenChar(): string | undefined;
588
571
  /**
589
- * Converts this node to an array if it is one.
590
- * @returns The array, or undefined if this node is not an array
591
- * @returns {JsonArray | undefined}
572
+ * Returns this node as a WordLit if it is one.
573
+ * @returns The WordLit, or undefined if this node is not a word literal
574
+ * @returns {WordLit | undefined}
592
575
  */
593
- asArray(): any;
576
+ asWordLit(): any;
594
577
  /**
595
- * Converts this node to an array, throwing if it's not an array.
596
- * @returns The array
597
- * @throws If this node is not an array
598
- * @returns {JsonArray}
578
+ * Returns the index of this node within its parent's children.
579
+ * @returns The child index
580
+ * @returns {number}
599
581
  */
600
- asArrayOrThrow(): any;
582
+ childIndex(): number;
583
+ /**
584
+ * Returns the indentation string used at this node's depth.
585
+ * @returns The indentation string, or undefined if not applicable
586
+ * @returns {string | undefined}
587
+ */
588
+ indentText(): string | undefined;
601
589
  /**
602
590
  * Converts this node to the root node if it is one.
603
591
  * @returns The root node, or undefined if this is not a root node
@@ -605,77 +593,30 @@ export class Node {
605
593
  */
606
594
  asRootNode(): any;
607
595
  /**
608
- * Converts this node to the root node, throwing if it's not a root node.
609
- * @returns The root node
610
- * @throws If this node is not a root node
611
- * @returns {RootNode}
612
- */
613
- asRootNodeOrThrow(): any;
614
- /**
615
- * Returns the decoded string value if this node is a string literal.
616
- * @returns The string value, or undefined if this node is not a string
617
- * @returns {string | undefined}
596
+ * Returns true if this node is a container (object, array, or property).
597
+ * @returns true if this is a container node
598
+ * @returns {boolean}
618
599
  */
619
- asString(): any;
600
+ isContainer(): boolean;
620
601
  /**
621
- * Returns the decoded string value, throwing if not a string.
622
- * @returns The string value
623
- * @throws If this node is not a string
624
- * @returns {string}
602
+ * Returns the next sibling node.
603
+ * @returns The next sibling, or undefined if this is the last child
604
+ * @returns {Node | undefined}
625
605
  */
626
- asStringOrThrow(): any;
606
+ nextSibling(): any;
627
607
  /**
628
608
  * Returns the raw string representation of a number literal.
629
609
  * Returns a string to preserve the exact formatting (e.g., "1.0" vs "1", "1e10" vs "10000000000").
630
610
  * @returns The number as a string, or undefined if this node is not a number
631
611
  * @returns {string | undefined}
632
612
  */
633
- numberValue(): any;
634
- /**
635
- * Returns the raw string representation of a number literal, throwing if not a number.
636
- * Returns a string to preserve the exact formatting (e.g., "1.0" vs "1", "1e10" vs "10000000000").
637
- * @returns The number as a string
638
- * @throws If this node is not a number
639
- * @returns {string}
640
- */
641
- numberValueOrThrow(): any;
642
- /**
643
- * Returns the boolean value if this node is a boolean literal.
644
- * @returns The boolean value, or undefined if this node is not a boolean
645
- * @returns {boolean | undefined}
646
- */
647
- asBoolean(): boolean | undefined;
648
- /**
649
- * Returns the boolean value, throwing if not a boolean.
650
- * @returns The boolean value
651
- * @throws If this node is not a boolean
652
- * @returns {boolean}
653
- */
654
- asBooleanOrThrow(): boolean;
655
- /**
656
- * Returns true if this node is a null keyword.
657
- * @returns true if this node represents null
658
- * @returns {boolean}
659
- */
660
- isNull(): boolean;
661
- /**
662
- * Returns true if this node is a string literal.
663
- * @returns true if this node is a string
664
- * @returns {boolean}
665
- */
666
- isString(): boolean;
667
- /**
668
- * Returns true if this node is a number literal.
669
- * @returns true if this node is a number
670
- * @returns {boolean}
671
- */
672
- isNumber(): boolean;
613
+ numberValue(): string | undefined;
673
614
  /**
674
- * Returns true if this node is a boolean literal.
675
- * @returns true if this node is a boolean
676
- * @returns {boolean}
615
+ * Returns this node as a NumberLit if it is one.
616
+ * @returns The NumberLit, or undefined if this node is not a number literal
617
+ * @returns {NumberLit | undefined}
677
618
  */
678
- isBoolean(): boolean;
619
+ asNumberLit(): any;
679
620
  /**
680
621
  * Returns this node as a StringLit if it is one.
681
622
  * @returns The StringLit, or undefined if this node is not a string literal
@@ -683,25 +624,23 @@ export class Node {
683
624
  */
684
625
  asStringLit(): any;
685
626
  /**
686
- * Returns this node as a StringLit, throwing if it's not a string literal.
687
- * @returns The StringLit
688
- * @throws If this node is not a string literal
689
- * @returns {StringLit}
627
+ * Returns the element index if this node is an array element.
628
+ * @returns The element index, or undefined if not an array element
629
+ * @returns {number | undefined}
690
630
  */
691
- asStringLitOrThrow(): any;
631
+ elementIndex(): any;
692
632
  /**
693
- * Returns this node as a NumberLit if it is one.
694
- * @returns The NumberLit, or undefined if this node is not a number literal
695
- * @returns {NumberLit | undefined}
633
+ * Returns true if this node is whitespace.
634
+ * @returns true if this node is whitespace
635
+ * @returns {boolean}
696
636
  */
697
- asNumberLit(): any;
637
+ isWhitespace(): boolean;
698
638
  /**
699
- * Returns this node as a NumberLit, throwing if it's not a number literal.
700
- * @returns The NumberLit
701
- * @throws If this node is not a number literal
702
- * @returns {NumberLit}
639
+ * Returns all next sibling nodes.
640
+ * @returns Array of next siblings
641
+ * @returns {Node[]}
703
642
  */
704
- asNumberLitOrThrow(): any;
643
+ nextSiblings(): any[];
705
644
  /**
706
645
  * Returns this node as a BooleanLit if it is one.
707
646
  * @returns The BooleanLit, or undefined if this node is not a boolean literal
@@ -709,44 +648,19 @@ export class Node {
709
648
  */
710
649
  asBooleanLit(): any;
711
650
  /**
712
- * Returns this node as a BooleanLit, throwing if it's not a boolean literal.
713
- * @returns The BooleanLit
714
- * @throws If this node is not a boolean literal
715
- * @returns {BooleanLit}
651
+ * Returns the child node at the specified index.
652
+ * @param index - The child index
653
+ * @returns The child node, or undefined if index is out of bounds
654
+ * @param {number} index
655
+ * @returns {Node | undefined}
716
656
  */
717
- asBooleanLitOrThrow(): any;
657
+ childAtIndex(index: number): any;
718
658
  /**
719
659
  * Returns this node as a NullKeyword if it is one.
720
660
  * @returns The NullKeyword, or undefined if this node is not a null keyword
721
661
  * @returns {NullKeyword | undefined}
722
662
  */
723
663
  asNullKeyword(): any;
724
- /**
725
- * Returns this node as a NullKeyword, throwing if it's not a null keyword.
726
- * @returns The NullKeyword
727
- * @throws If this node is not a null keyword
728
- * @returns {NullKeyword}
729
- */
730
- asNullKeywordOrThrow(): any;
731
- /**
732
- * Returns this node as a WordLit if it is one.
733
- * @returns The WordLit, or undefined if this node is not a word literal
734
- * @returns {WordLit | undefined}
735
- */
736
- asWordLit(): any;
737
- /**
738
- * Returns this node as a WordLit, throwing if it's not a word literal.
739
- * @returns The WordLit
740
- * @throws If this node is not a word literal
741
- * @returns {WordLit}
742
- */
743
- asWordLitOrThrow(): any;
744
- /**
745
- * Returns the parent node in the CST.
746
- * @returns The parent node, or undefined if this is the root
747
- * @returns {Node | undefined}
748
- */
749
- parent(): any;
750
664
  /**
751
665
  * Returns the parent node, throwing if this is the root.
752
666
  * @returns The parent node
@@ -754,24 +668,19 @@ export class Node {
754
668
  * @returns {Node}
755
669
  */
756
670
  parentOrThrow(): any;
757
- /**
758
- * Returns the index of this node within its parent's children.
759
- * @returns The child index
760
- * @returns {number}
761
- */
762
- childIndex(): number;
763
- /**
764
- * Returns all ancestor nodes from parent to root.
765
- * @returns Array of ancestor nodes
766
- * @returns {Node[]}
767
- */
768
- ancestors(): any[];
769
671
  /**
770
672
  * Returns the previous sibling node.
771
673
  * @returns The previous sibling, or undefined if this is the first child
772
674
  * @returns {Node | undefined}
773
675
  */
774
676
  previousSibling(): any;
677
+ /**
678
+ * Converts this node to an array, throwing if it's not an array.
679
+ * @returns The array
680
+ * @throws If this node is not an array
681
+ * @returns {JsonArray}
682
+ */
683
+ asArrayOrThrow(): any;
775
684
  /**
776
685
  * Returns all previous sibling nodes.
777
686
  * @returns Array of previous siblings
@@ -779,23 +688,19 @@ export class Node {
779
688
  */
780
689
  previousSiblings(): any[];
781
690
  /**
782
- * Returns the next sibling node.
783
- * @returns The next sibling, or undefined if this is the last child
784
- * @returns {Node | undefined}
785
- */
786
- nextSibling(): any;
787
- /**
788
- * Returns all next sibling nodes.
789
- * @returns Array of next siblings
790
- * @returns {Node[]}
691
+ * Converts this node to an object, throwing if it's not an object.
692
+ * @returns The object
693
+ * @throws If this node is not an object
694
+ * @returns {JsonObject}
791
695
  */
792
- nextSiblings(): any[];
696
+ asObjectOrThrow(): any;
793
697
  /**
794
- * Returns the root node of the document.
795
- * @returns The root node, or undefined if detached
796
- * @returns {RootNode | undefined}
698
+ * Returns the decoded string value, throwing if not a string.
699
+ * @returns The string value
700
+ * @throws If this node is not a string
701
+ * @returns {string}
797
702
  */
798
- rootNode(): any;
703
+ asStringOrThrow(): string;
799
704
  /**
800
705
  * Returns the root node, throwing if detached.
801
706
  * @returns The root node
@@ -804,11 +709,19 @@ export class Node {
804
709
  */
805
710
  rootNodeOrThrow(): any;
806
711
  /**
807
- * Returns the indentation string used at this node's depth.
808
- * @returns The indentation string, or undefined if not applicable
809
- * @returns {string | undefined}
712
+ * Returns the boolean value, throwing if not a boolean.
713
+ * @returns The boolean value
714
+ * @throws If this node is not a boolean
715
+ * @returns {boolean}
716
+ */
717
+ asBooleanOrThrow(): boolean;
718
+ /**
719
+ * Returns this node as a WordLit, throwing if it's not a word literal.
720
+ * @returns The WordLit
721
+ * @throws If this node is not a word literal
722
+ * @returns {WordLit}
810
723
  */
811
- indentText(): any;
724
+ asWordLitOrThrow(): any;
812
725
  /**
813
726
  * Returns whether this node's container uses trailing commas.
814
727
  * @returns true if trailing commas are used
@@ -816,53 +729,84 @@ export class Node {
816
729
  */
817
730
  usesTrailingCommas(): boolean;
818
731
  /**
819
- * Returns true if this node is trivia (whitespace or comments).
820
- * @returns true if this node is trivia
821
- * @returns {boolean}
822
- */
823
- isTrivia(): boolean;
824
- /**
825
- * Returns true if this node is a newline character.
826
- * @returns true if this node is a newline
827
- * @returns {boolean}
732
+ * Converts this node to the root node, throwing if it's not a root node.
733
+ * @returns The root node
734
+ * @throws If this node is not a root node
735
+ * @returns {RootNode}
828
736
  */
829
- isNewline(): boolean;
737
+ asRootNodeOrThrow(): any;
830
738
  /**
831
- * Returns true if this node is a comma token.
832
- * @returns true if this node is a comma
833
- * @returns {boolean}
739
+ * Returns the raw string representation of a number literal, throwing if not a number.
740
+ * Returns a string to preserve the exact formatting (e.g., "1.0" vs "1", "1e10" vs "10000000000").
741
+ * @returns The number as a string
742
+ * @throws If this node is not a number
743
+ * @returns {string}
834
744
  */
835
- isComma(): boolean;
745
+ numberValueOrThrow(): string;
836
746
  /**
837
- * Returns true if this node is a comment.
838
- * @returns true if this node is a comment
839
- * @returns {boolean}
747
+ * Returns this node as a NumberLit, throwing if it's not a number literal.
748
+ * @returns The NumberLit
749
+ * @throws If this node is not a number literal
750
+ * @returns {NumberLit}
840
751
  */
841
- isComment(): boolean;
752
+ asNumberLitOrThrow(): any;
842
753
  /**
843
- * Returns true if this node is a punctuation token (bracket, brace, colon, comma).
844
- * @returns true if this node is a token
845
- * @returns {boolean}
754
+ * Returns this node as a StringLit, throwing if it's not a string literal.
755
+ * @returns The StringLit
756
+ * @throws If this node is not a string literal
757
+ * @returns {StringLit}
846
758
  */
847
- isToken(): boolean;
759
+ asStringLitOrThrow(): any;
848
760
  /**
849
- * Returns true if this node is whitespace.
850
- * @returns true if this node is whitespace
761
+ * Returns this node as a BooleanLit, throwing if it's not a boolean literal.
762
+ * @returns The BooleanLit
763
+ * @throws If this node is not a boolean literal
764
+ * @returns {BooleanLit}
765
+ */
766
+ asBooleanLitOrThrow(): any;
767
+ /**
768
+ * Returns this node as a NullKeyword, throwing if it's not a null keyword.
769
+ * @returns The NullKeyword
770
+ * @throws If this node is not a null keyword
771
+ * @returns {NullKeyword}
772
+ */
773
+ asNullKeywordOrThrow(): any;
774
+ /**
775
+ * Returns child nodes excluding whitespace, comments, and punctuation.
776
+ * @returns Array of significant child nodes
777
+ * @returns {Node[]}
778
+ */
779
+ childrenExcludeTriviaAndTokens(): any[];
780
+ /**
781
+ * Returns the parent node in the CST.
782
+ * @returns The parent node, or undefined if this is the root
783
+ * @returns {Node | undefined}
784
+ */
785
+ parent(): any;
786
+ /**
787
+ * Removes this node from its parent.
788
+ * Works for any node kind, including whitespace, comments, tokens, containers, and leaf values.
789
+ * After calling this method, the node is detached from the CST and can no longer be used.
790
+ */
791
+ remove(): void;
792
+ /**
793
+ * Returns true if this node is a leaf value (string, number, boolean, null).
794
+ * @returns true if this is a leaf node
851
795
  * @returns {boolean}
852
796
  */
853
- isWhitespace(): boolean;
797
+ isLeaf(): boolean;
854
798
  /**
855
- * Returns the character if this node is a single-character token.
856
- * @returns The token character, or undefined if not a token
857
- * @returns {string | undefined}
799
+ * Returns true if this node is a null keyword.
800
+ * @returns true if this node represents null
801
+ * @returns {boolean}
858
802
  */
859
- tokenChar(): any;
803
+ isNull(): boolean;
860
804
  /**
861
- * Returns the element index if this node is an array element.
862
- * @returns The element index, or undefined if not an array element
863
- * @returns {number | undefined}
805
+ * Converts this node to an array if it is one.
806
+ * @returns The array, or undefined if this node is not an array
807
+ * @returns {JsonArray | undefined}
864
808
  */
865
- elementIndex(): any;
809
+ asArray(): any;
866
810
  /**
867
811
  * Returns all child nodes including whitespace and punctuation.
868
812
  * @returns Array of all child nodes
@@ -870,19 +814,17 @@ export class Node {
870
814
  */
871
815
  children(): any[];
872
816
  /**
873
- * Returns child nodes excluding whitespace, comments, and punctuation.
874
- * @returns Array of significant child nodes
875
- * @returns {Node[]}
817
+ * Returns true if this node is a comma token.
818
+ * @returns true if this node is a comma
819
+ * @returns {boolean}
876
820
  */
877
- childrenExcludeTriviaAndTokens(): any[];
821
+ isComma(): boolean;
878
822
  /**
879
- * Returns the child node at the specified index.
880
- * @param index - The child index
881
- * @returns The child node, or undefined if index is out of bounds
882
- * @param {number} index
883
- * @returns {Node | undefined}
823
+ * Returns true if this node is a punctuation token (bracket, brace, colon, comma).
824
+ * @returns true if this node is a token
825
+ * @returns {boolean}
884
826
  */
885
- childAtIndex(index: number): any;
827
+ isToken(): boolean;
886
828
  /**
887
829
  * Converts this CST node to a plain JavaScript value.
888
830
  * This recursively converts objects, arrays, and primitives to their JavaScript equivalents.
@@ -892,6 +834,48 @@ export class Node {
892
834
  * @returns {any}
893
835
  */
894
836
  toValue(): any;
837
+ /**
838
+ * Returns all ancestor nodes from parent to root.
839
+ * @returns Array of ancestor nodes
840
+ * @returns {Node[]}
841
+ */
842
+ ancestors(): any[];
843
+ /**
844
+ * Converts this node to an object if it is one.
845
+ * @returns The object, or undefined if this node is not an object
846
+ * @returns {JsonObject | undefined}
847
+ */
848
+ asObject(): any;
849
+ /**
850
+ * Returns the decoded string value if this node is a string literal.
851
+ * @returns The string value, or undefined if this node is not a string
852
+ * @returns {string | undefined}
853
+ */
854
+ asString(): string | undefined;
855
+ /**
856
+ * Returns true if this node is a number literal.
857
+ * @returns true if this node is a number
858
+ * @returns {boolean}
859
+ */
860
+ isNumber(): boolean;
861
+ /**
862
+ * Returns true if this node is a string literal.
863
+ * @returns true if this node is a string
864
+ * @returns {boolean}
865
+ */
866
+ isString(): boolean;
867
+ /**
868
+ * Returns true if this node is trivia (whitespace or comments).
869
+ * @returns true if this node is trivia
870
+ * @returns {boolean}
871
+ */
872
+ isTrivia(): boolean;
873
+ /**
874
+ * Returns the root node of the document.
875
+ * @returns The root node, or undefined if detached
876
+ * @returns {RootNode | undefined}
877
+ */
878
+ rootNode(): any;
895
879
  }
896
880
  /**
897
881
  * Represents a null keyword node in the CST.
@@ -902,36 +886,37 @@ export class NullKeyword {
902
886
  __wbg_ptr: number | undefined;
903
887
  free(): void;
904
888
  /**
905
- * Replaces this null keyword with a new value.
906
- * @param replacement - The new value to replace this null with
907
- * @returns The new node that replaced this one, or undefined if this was the root value
908
- * @param {any} replacement
909
- * @returns {Node | undefined}
889
+ * Returns the index of this node within its parent's children.
890
+ * @returns The child index
891
+ * @returns {number}
910
892
  */
911
- replaceWith(replacement: any): any;
893
+ childIndex(): number;
912
894
  /**
913
- * Removes this node from its parent.
914
- * After calling this method, the node is detached from the CST and can no longer be used.
895
+ * Returns the indentation string used at this node's depth.
896
+ * @returns The indentation string, or undefined if not applicable
897
+ * @returns {string | undefined}
915
898
  */
916
- remove(): void;
899
+ indentText(): string | undefined;
917
900
  /**
918
- * Returns the parent node in the CST.
919
- * @returns The parent node, or undefined if this is the root
901
+ * Returns the next sibling node.
902
+ * @returns The next sibling, or undefined if this is the last child
920
903
  * @returns {Node | undefined}
921
904
  */
922
- parent(): any;
905
+ nextSibling(): any;
923
906
  /**
924
- * Returns all ancestor nodes from parent to root.
925
- * @returns Array of ancestor nodes
926
- * @returns {Node[]}
907
+ * Replaces this null keyword with a new value.
908
+ * @param replacement - The new value to replace this null with
909
+ * @returns The new node that replaced this one, or undefined if this was the root value
910
+ * @param {any} replacement
911
+ * @returns {Node | undefined}
927
912
  */
928
- ancestors(): any[];
913
+ replaceWith(replacement: any): any;
929
914
  /**
930
- * Returns the index of this node within its parent's children.
931
- * @returns The child index
932
- * @returns {number}
915
+ * Returns all next sibling nodes.
916
+ * @returns Array of next siblings
917
+ * @returns {Node[]}
933
918
  */
934
- childIndex(): number;
919
+ nextSiblings(): any[];
935
920
  /**
936
921
  * Returns the previous sibling node.
937
922
  * @returns The previous sibling, or undefined if this is the first child
@@ -945,35 +930,34 @@ export class NullKeyword {
945
930
  */
946
931
  previousSiblings(): any[];
947
932
  /**
948
- * Returns the next sibling node.
949
- * @returns The next sibling, or undefined if this is the last child
933
+ * Returns whether this node's container uses trailing commas.
934
+ * @returns true if trailing commas are used
935
+ * @returns {boolean}
936
+ */
937
+ usesTrailingCommas(): boolean;
938
+ /**
939
+ * Returns the parent node in the CST.
940
+ * @returns The parent node, or undefined if this is the root
950
941
  * @returns {Node | undefined}
951
942
  */
952
- nextSibling(): any;
943
+ parent(): any;
953
944
  /**
954
- * Returns all next sibling nodes.
955
- * @returns Array of next siblings
945
+ * Removes this node from its parent.
946
+ * After calling this method, the node is detached from the CST and can no longer be used.
947
+ */
948
+ remove(): void;
949
+ /**
950
+ * Returns all ancestor nodes from parent to root.
951
+ * @returns Array of ancestor nodes
956
952
  * @returns {Node[]}
957
953
  */
958
- nextSiblings(): any[];
954
+ ancestors(): any[];
959
955
  /**
960
956
  * Returns the root node of the document.
961
957
  * @returns The root node, or undefined if detached
962
958
  * @returns {RootNode | undefined}
963
959
  */
964
960
  rootNode(): any;
965
- /**
966
- * Returns the indentation string used at this node's depth.
967
- * @returns The indentation string, or undefined if not applicable
968
- * @returns {string | undefined}
969
- */
970
- indentText(): any;
971
- /**
972
- * Returns whether this node's container uses trailing commas.
973
- * @returns true if trailing commas are used
974
- * @returns {boolean}
975
- */
976
- usesTrailingCommas(): boolean;
977
961
  }
978
962
  /**
979
963
  * Represents a number literal node in the CST.
@@ -985,19 +969,23 @@ export class NumberLit {
985
969
  __wbg_ptr: number | undefined;
986
970
  free(): void;
987
971
  /**
988
- * Returns the raw string representation of the number.
989
- * Returns a string to preserve the exact formatting (e.g., "1.0" vs "1", "1e10" vs "10000000000").
990
- * @returns The number as a string
991
- * @returns {string}
972
+ * Returns the index of this node within its parent's children.
973
+ * @returns The child index
974
+ * @returns {number}
992
975
  */
993
- value(): any;
976
+ childIndex(): number;
994
977
  /**
995
- * Sets the raw number value.
996
- * The value should be a valid JSON number string (e.g., "42", "3.14", "1e10").
997
- * @param value - The raw number string to set
998
- * @param {string} value
978
+ * Returns the indentation string used at this node's depth.
979
+ * @returns The indentation string, or undefined if not applicable
980
+ * @returns {string | undefined}
999
981
  */
1000
- setRawValue(value: string): void;
982
+ indentText(): string | undefined;
983
+ /**
984
+ * Returns the next sibling node.
985
+ * @returns The next sibling, or undefined if this is the last child
986
+ * @returns {Node | undefined}
987
+ */
988
+ nextSibling(): any;
1001
989
  /**
1002
990
  * Replaces this number literal with a new value.
1003
991
  * @param replacement - The new value to replace this number with
@@ -1007,28 +995,18 @@ export class NumberLit {
1007
995
  */
1008
996
  replaceWith(replacement: any): any;
1009
997
  /**
1010
- * Removes this node from its parent.
1011
- * After calling this method, the node is detached from the CST and can no longer be used.
1012
- */
1013
- remove(): void;
1014
- /**
1015
- * Returns the parent node in the CST.
1016
- * @returns The parent node, or undefined if this is the root
1017
- * @returns {Node | undefined}
1018
- */
1019
- parent(): any;
1020
- /**
1021
- * Returns all ancestor nodes from parent to root.
1022
- * @returns Array of ancestor nodes
998
+ * Returns all next sibling nodes.
999
+ * @returns Array of next siblings
1023
1000
  * @returns {Node[]}
1024
1001
  */
1025
- ancestors(): any[];
1002
+ nextSiblings(): any[];
1026
1003
  /**
1027
- * Returns the index of this node within its parent's children.
1028
- * @returns The child index
1029
- * @returns {number}
1004
+ * Sets the raw number value.
1005
+ * The value should be a valid JSON number string (e.g., "42", "3.14", "1e10").
1006
+ * @param value - The raw number string to set
1007
+ * @param {string} value
1030
1008
  */
1031
- childIndex(): number;
1009
+ setRawValue(value: string): void;
1032
1010
  /**
1033
1011
  * Returns the previous sibling node.
1034
1012
  * @returns The previous sibling, or undefined if this is the first child
@@ -1042,35 +1020,41 @@ export class NumberLit {
1042
1020
  */
1043
1021
  previousSiblings(): any[];
1044
1022
  /**
1045
- * Returns the next sibling node.
1046
- * @returns The next sibling, or undefined if this is the last child
1047
- * @returns {Node | undefined}
1023
+ * Returns whether this node's container uses trailing commas.
1024
+ * @returns true if trailing commas are used
1025
+ * @returns {boolean}
1048
1026
  */
1049
- nextSibling(): any;
1027
+ usesTrailingCommas(): boolean;
1050
1028
  /**
1051
- * Returns all next sibling nodes.
1052
- * @returns Array of next siblings
1053
- * @returns {Node[]}
1029
+ * Returns the raw string representation of the number.
1030
+ * Returns a string to preserve the exact formatting (e.g., "1.0" vs "1", "1e10" vs "10000000000").
1031
+ * @returns The number as a string
1032
+ * @returns {string}
1054
1033
  */
1055
- nextSiblings(): any[];
1034
+ value(): string;
1056
1035
  /**
1057
- * Returns the root node of the document.
1058
- * @returns The root node, or undefined if detached
1059
- * @returns {RootNode | undefined}
1060
- */
1061
- rootNode(): any;
1036
+ * Returns the parent node in the CST.
1037
+ * @returns The parent node, or undefined if this is the root
1038
+ * @returns {Node | undefined}
1039
+ */
1040
+ parent(): any;
1062
1041
  /**
1063
- * Returns the indentation string used at this node's depth.
1064
- * @returns The indentation string, or undefined if not applicable
1065
- * @returns {string | undefined}
1042
+ * Removes this node from its parent.
1043
+ * After calling this method, the node is detached from the CST and can no longer be used.
1066
1044
  */
1067
- indentText(): any;
1045
+ remove(): void;
1068
1046
  /**
1069
- * Returns whether this node's container uses trailing commas.
1070
- * @returns true if trailing commas are used
1071
- * @returns {boolean}
1047
+ * Returns all ancestor nodes from parent to root.
1048
+ * @returns Array of ancestor nodes
1049
+ * @returns {Node[]}
1072
1050
  */
1073
- usesTrailingCommas(): boolean;
1051
+ ancestors(): any[];
1052
+ /**
1053
+ * Returns the root node of the document.
1054
+ * @returns The root node, or undefined if detached
1055
+ * @returns {RootNode | undefined}
1056
+ */
1057
+ rootNode(): any;
1074
1058
  }
1075
1059
  /**
1076
1060
  * Represents an object property (key-value pair) in the CST.
@@ -1082,11 +1066,34 @@ export class ObjectProp {
1082
1066
  __wbg_ptr: number | undefined;
1083
1067
  free(): void;
1084
1068
  /**
1085
- * Returns the property name.
1086
- * @returns The property name, or undefined if malformed
1087
- * @returns {ObjectPropName | undefined}
1069
+ * Returns the index of this node within its parent's children.
1070
+ * @returns The child index
1071
+ * @returns {number}
1088
1072
  */
1089
- name(): any;
1073
+ childIndex(): number;
1074
+ /**
1075
+ * Returns the indentation string used at this node's depth.
1076
+ * @returns The indentation string, or undefined if not applicable
1077
+ * @returns {string | undefined}
1078
+ */
1079
+ indentText(): string | undefined;
1080
+ /**
1081
+ * Returns the next sibling node.
1082
+ * @returns The next sibling, or undefined if this is the last child
1083
+ * @returns {Node | undefined}
1084
+ */
1085
+ nextSibling(): any;
1086
+ /**
1087
+ * Replaces this property with a new property.
1088
+ * This allows changing both the property name and its value.
1089
+ * @param key - The new property name
1090
+ * @param replacement - The new value for the property
1091
+ * @returns The new node that replaced this property, or undefined if this was the root value
1092
+ * @param {string} key
1093
+ * @param {any} replacement
1094
+ * @returns {Node | undefined}
1095
+ */
1096
+ replaceWith(key: string, replacement: any): any;
1090
1097
  /**
1091
1098
  * Returns the property name, throwing if malformed.
1092
1099
  * @returns The property name
@@ -1095,11 +1102,37 @@ export class ObjectProp {
1095
1102
  */
1096
1103
  nameOrThrow(): any;
1097
1104
  /**
1098
- * Returns the property value.
1099
- * @returns The property value, or undefined if malformed
1105
+ * Returns the next property in the same object.
1106
+ * @returns The next property, or undefined if this is the last property
1107
+ * @returns {ObjectProp | undefined}
1108
+ */
1109
+ nextProperty(): any;
1110
+ /**
1111
+ * Returns all next sibling nodes.
1112
+ * @returns Array of next siblings
1113
+ * @returns {Node[]}
1114
+ */
1115
+ nextSiblings(): any[];
1116
+ /**
1117
+ * Returns the child node at the specified index.
1118
+ * @param index - The child index
1119
+ * @returns The child node, or undefined if index is out of bounds
1120
+ * @param {number} index
1100
1121
  * @returns {Node | undefined}
1101
1122
  */
1102
- value(): any;
1123
+ childAtIndex(index: number): any;
1124
+ /**
1125
+ * Returns the index of this property within its parent object.
1126
+ * @returns The property index
1127
+ * @returns {number}
1128
+ */
1129
+ propertyIndex(): number;
1130
+ /**
1131
+ * Returns the property value if it's an array.
1132
+ * @returns The array value, or undefined if not an array
1133
+ * @returns {JsonArray | undefined}
1134
+ */
1135
+ valueIfArray(): any;
1103
1136
  /**
1104
1137
  * Returns the property value, throwing if malformed.
1105
1138
  * @returns The property value
@@ -1114,32 +1147,29 @@ export class ObjectProp {
1114
1147
  */
1115
1148
  valueIfObject(): any;
1116
1149
  /**
1117
- * Returns the property value as an object, throwing if not an object.
1118
- * @returns The object value
1119
- * @throws If the property value is not an object
1120
- * @returns {JsonObject}
1150
+ * Returns the previous sibling node.
1151
+ * @returns The previous sibling, or undefined if this is the first child
1152
+ * @returns {Node | undefined}
1121
1153
  */
1122
- valueIfObjectOrThrow(): any;
1154
+ previousSibling(): any;
1123
1155
  /**
1124
- * Gets the property value as an object, replacing the value with an empty object if needed.
1125
- * Always returns an object by replacing non-object values.
1126
- * @returns The object value (always succeeds)
1127
- * @returns {JsonObject}
1156
+ * Returns the previous property in the same object.
1157
+ * @returns The previous property, or undefined if this is the first property
1158
+ * @returns {ObjectProp | undefined}
1128
1159
  */
1129
- valueIfObjectOrForce(): any;
1160
+ previousProperty(): any;
1130
1161
  /**
1131
- * Returns the property value if it's an array.
1132
- * @returns The array value, or undefined if not an array
1133
- * @returns {JsonArray | undefined}
1162
+ * Returns all previous sibling nodes.
1163
+ * @returns Array of previous siblings
1164
+ * @returns {Node[]}
1134
1165
  */
1135
- valueIfArray(): any;
1166
+ previousSiblings(): any[];
1136
1167
  /**
1137
- * Returns the property value as an array, throwing if not an array.
1138
- * @returns The array value
1139
- * @throws If the property value is not an array
1140
- * @returns {JsonArray}
1168
+ * Returns whether this node's container uses trailing commas.
1169
+ * @returns true if trailing commas are used
1170
+ * @returns {boolean}
1141
1171
  */
1142
- valueIfArrayOrThrow(): any;
1172
+ usesTrailingCommas(): boolean;
1143
1173
  /**
1144
1174
  * Gets the property value as an array, replacing the value with an empty array if needed.
1145
1175
  * Always returns an array by replacing non-array values.
@@ -1148,45 +1178,89 @@ export class ObjectProp {
1148
1178
  */
1149
1179
  valueIfArrayOrForce(): any;
1150
1180
  /**
1151
- * Removes this property from its parent object.
1152
- * After calling this method, the property is detached from the CST and can no longer be used.
1181
+ * Returns the property value as an array, throwing if not an array.
1182
+ * @returns The array value
1183
+ * @throws If the property value is not an array
1184
+ * @returns {JsonArray}
1153
1185
  */
1154
- remove(): void;
1186
+ valueIfArrayOrThrow(): any;
1155
1187
  /**
1156
- * Returns the index of this property within its parent object.
1157
- * @returns The property index
1158
- * @returns {number}
1188
+ * Gets the property value as an object, replacing the value with an empty object if needed.
1189
+ * Always returns an object by replacing non-object values.
1190
+ * @returns The object value (always succeeds)
1191
+ * @returns {JsonObject}
1159
1192
  */
1160
- propertyIndex(): number;
1193
+ valueIfObjectOrForce(): any;
1161
1194
  /**
1162
- * Sets the value of this property.
1163
- * @param value - The new value to set
1164
- * @param {any} value
1195
+ * Returns the property value as an object, throwing if not an object.
1196
+ * @returns The object value
1197
+ * @throws If the property value is not an object
1198
+ * @returns {JsonObject}
1165
1199
  */
1166
- setValue(value: any): void;
1200
+ valueIfObjectOrThrow(): any;
1167
1201
  /**
1168
- * Replaces this property with a new property.
1169
- * This allows changing both the property name and its value.
1170
- * @param key - The new property name
1171
- * @param replacement - The new value for the property
1172
- * @returns The new node that replaced this property, or undefined if this was the root value
1173
- * @param {string} key
1174
- * @param {any} replacement
1202
+ * Returns child nodes excluding whitespace, comments, and punctuation.
1203
+ * @returns Array of significant child nodes
1204
+ * @returns {Node[]}
1205
+ */
1206
+ childrenExcludeTriviaAndTokens(): any[];
1207
+ /**
1208
+ * Returns the property name.
1209
+ * @returns The property name, or undefined if malformed
1210
+ * @returns {ObjectPropName | undefined}
1211
+ */
1212
+ name(): any;
1213
+ /**
1214
+ * Returns the property value.
1215
+ * @returns The property value, or undefined if malformed
1175
1216
  * @returns {Node | undefined}
1176
1217
  */
1177
- replaceWith(key: string, replacement: any): any;
1218
+ value(): any;
1178
1219
  /**
1179
1220
  * Returns the parent node in the CST.
1180
1221
  * @returns The parent node, or undefined if this is the root
1181
1222
  * @returns {Node | undefined}
1182
1223
  */
1183
1224
  parent(): any;
1225
+ /**
1226
+ * Removes this property from its parent object.
1227
+ * After calling this method, the property is detached from the CST and can no longer be used.
1228
+ */
1229
+ remove(): void;
1230
+ /**
1231
+ * Returns all child nodes including whitespace and punctuation.
1232
+ * @returns Array of all child nodes
1233
+ * @returns {Node[]}
1234
+ */
1235
+ children(): any[];
1184
1236
  /**
1185
1237
  * Returns all ancestor nodes from parent to root.
1186
1238
  * @returns Array of ancestor nodes
1187
1239
  * @returns {Node[]}
1188
1240
  */
1189
1241
  ancestors(): any[];
1242
+ /**
1243
+ * Returns the root node of the document.
1244
+ * @returns The root node, or undefined if detached
1245
+ * @returns {RootNode | undefined}
1246
+ */
1247
+ rootNode(): any;
1248
+ /**
1249
+ * Sets the value of this property.
1250
+ * @param value - The new value to set
1251
+ * @param {any} value
1252
+ */
1253
+ setValue(value: any): void;
1254
+ }
1255
+ /**
1256
+ * Represents the name part of an object property in the CST.
1257
+ * Can be either a quoted string or an unquoted word literal (when allowLooseObjectPropertyNames is enabled).
1258
+ */
1259
+ export class ObjectPropName {
1260
+ static __wrap(ptr: any): any;
1261
+ __destroy_into_raw(): number | undefined;
1262
+ __wbg_ptr: number | undefined;
1263
+ free(): void;
1190
1264
  /**
1191
1265
  * Returns the index of this node within its parent's children.
1192
1266
  * @returns The child index
@@ -1194,17 +1268,11 @@ export class ObjectProp {
1194
1268
  */
1195
1269
  childIndex(): number;
1196
1270
  /**
1197
- * Returns the previous sibling node.
1198
- * @returns The previous sibling, or undefined if this is the first child
1199
- * @returns {Node | undefined}
1200
- */
1201
- previousSibling(): any;
1202
- /**
1203
- * Returns all previous sibling nodes.
1204
- * @returns Array of previous siblings
1205
- * @returns {Node[]}
1271
+ * Returns the indentation string used at this node's depth.
1272
+ * @returns The indentation string, or undefined if not applicable
1273
+ * @returns {string | undefined}
1206
1274
  */
1207
- previousSiblings(): any[];
1275
+ indentText(): string | undefined;
1208
1276
  /**
1209
1277
  * Returns the next sibling node.
1210
1278
  * @returns The next sibling, or undefined if this is the last child
@@ -1212,35 +1280,17 @@ export class ObjectProp {
1212
1280
  */
1213
1281
  nextSibling(): any;
1214
1282
  /**
1215
- * Returns all next sibling nodes.
1216
- * @returns Array of next siblings
1217
- * @returns {Node[]}
1218
- */
1219
- nextSiblings(): any[];
1220
- /**
1221
- * Returns the previous property in the same object.
1222
- * @returns The previous property, or undefined if this is the first property
1223
- * @returns {ObjectProp | undefined}
1224
- */
1225
- previousProperty(): any;
1226
- /**
1227
- * Returns the next property in the same object.
1228
- * @returns The next property, or undefined if this is the last property
1229
- * @returns {ObjectProp | undefined}
1230
- */
1231
- nextProperty(): any;
1232
- /**
1233
- * Returns the root node of the document.
1234
- * @returns The root node, or undefined if detached
1235
- * @returns {RootNode | undefined}
1283
+ * Returns the decoded property name (unquoted and unescaped).
1284
+ * @returns The decoded property name
1285
+ * @returns {string}
1236
1286
  */
1237
- rootNode(): any;
1287
+ decodedValue(): string;
1238
1288
  /**
1239
- * Returns the indentation string used at this node's depth.
1240
- * @returns The indentation string, or undefined if not applicable
1241
- * @returns {string | undefined}
1289
+ * Returns the previous sibling node.
1290
+ * @returns The previous sibling, or undefined if this is the first child
1291
+ * @returns {Node | undefined}
1242
1292
  */
1243
- indentText(): any;
1293
+ previousSibling(): any;
1244
1294
  /**
1245
1295
  * Returns whether this node's container uses trailing commas.
1246
1296
  * @returns true if trailing commas are used
@@ -1248,53 +1298,33 @@ export class ObjectProp {
1248
1298
  */
1249
1299
  usesTrailingCommas(): boolean;
1250
1300
  /**
1251
- * Returns all child nodes including whitespace and punctuation.
1252
- * @returns Array of all child nodes
1253
- * @returns {Node[]}
1301
+ * Returns the parent node in the CST.
1302
+ * @returns The parent node, or undefined if this is the root
1303
+ * @returns {Node | undefined}
1254
1304
  */
1255
- children(): any[];
1305
+ parent(): any;
1256
1306
  /**
1257
- * Returns child nodes excluding whitespace, comments, and punctuation.
1258
- * @returns Array of significant child nodes
1307
+ * Returns all ancestor nodes from parent to root.
1308
+ * @returns Array of ancestor nodes
1259
1309
  * @returns {Node[]}
1260
1310
  */
1261
- childrenExcludeTriviaAndTokens(): any[];
1311
+ ancestors(): any[];
1262
1312
  /**
1263
- * Returns the child node at the specified index.
1264
- * @param index - The child index
1265
- * @returns The child node, or undefined if index is out of bounds
1266
- * @param {number} index
1267
- * @returns {Node | undefined}
1313
+ * Returns the root node of the document.
1314
+ * @returns The root node, or undefined if detached
1315
+ * @returns {RootNode | undefined}
1268
1316
  */
1269
- childAtIndex(index: number): any;
1317
+ rootNode(): any;
1270
1318
  }
1271
1319
  /**
1272
- * Represents the name part of an object property in the CST.
1273
- * Can be either a quoted string or an unquoted word literal (when allowLooseObjectPropertyNames is enabled).
1320
+ * Represents the root node of a JSONC document.
1321
+ * This is the entry point for manipulating the concrete syntax tree.
1274
1322
  */
1275
- export class ObjectPropName {
1323
+ export class RootNode {
1276
1324
  static __wrap(ptr: any): any;
1277
1325
  __destroy_into_raw(): number | undefined;
1278
1326
  __wbg_ptr: number | undefined;
1279
1327
  free(): void;
1280
- /**
1281
- * Returns the decoded property name (unquoted and unescaped).
1282
- * @returns The decoded property name
1283
- * @returns {string}
1284
- */
1285
- decodedValue(): any;
1286
- /**
1287
- * Returns the parent node in the CST.
1288
- * @returns The parent node, or undefined if this is the root
1289
- * @returns {Node | undefined}
1290
- */
1291
- parent(): any;
1292
- /**
1293
- * Returns the root node of the document.
1294
- * @returns The root node, or undefined if detached
1295
- * @returns {RootNode | undefined}
1296
- */
1297
- rootNode(): any;
1298
1328
  /**
1299
1329
  * Returns the index of this node within its parent's children.
1300
1330
  * @returns The child index
@@ -1302,17 +1332,17 @@ export class ObjectPropName {
1302
1332
  */
1303
1333
  childIndex(): number;
1304
1334
  /**
1305
- * Returns all ancestor nodes from parent to root.
1306
- * @returns Array of ancestor nodes
1307
- * @returns {Node[]}
1335
+ * Returns the indentation string used at this node's depth.
1336
+ * @returns The indentation string, or undefined if not applicable
1337
+ * @returns {string | undefined}
1308
1338
  */
1309
- ancestors(): any[];
1339
+ indentText(): string | undefined;
1310
1340
  /**
1311
- * Returns the previous sibling node.
1312
- * @returns The previous sibling, or undefined if this is the first child
1313
- * @returns {Node | undefined}
1341
+ * Returns the newline kind used in the document.
1342
+ * @returns Either "\n" or "\r\n"
1343
+ * @returns {string}
1314
1344
  */
1315
- previousSibling(): any;
1345
+ newlineKind(): any;
1316
1346
  /**
1317
1347
  * Returns the next sibling node.
1318
1348
  * @returns The next sibling, or undefined if this is the last child
@@ -1320,33 +1350,23 @@ export class ObjectPropName {
1320
1350
  */
1321
1351
  nextSibling(): any;
1322
1352
  /**
1323
- * Returns the indentation string used at this node's depth.
1324
- * @returns The indentation string, or undefined if not applicable
1325
- * @returns {string | undefined}
1353
+ * Returns all next sibling nodes.
1354
+ * @returns Array of next siblings
1355
+ * @returns {Node[]}
1326
1356
  */
1327
- indentText(): any;
1357
+ nextSiblings(): any[];
1328
1358
  /**
1329
- * Returns whether this node's container uses trailing commas.
1330
- * @returns true if trailing commas are used
1331
- * @returns {boolean}
1359
+ * Returns the child node at the specified index.
1360
+ * @param index - The child index
1361
+ * @returns The child node, or undefined if index is out of bounds
1362
+ * @param {number} index
1363
+ * @returns {Node | undefined}
1332
1364
  */
1333
- usesTrailingCommas(): boolean;
1334
- }
1335
- /**
1336
- * Represents the root node of a JSONC document.
1337
- * This is the entry point for manipulating the concrete syntax tree.
1338
- */
1339
- export class RootNode {
1340
- static __wrap(ptr: any): any;
1341
- __destroy_into_raw(): number | undefined;
1342
- __wbg_ptr: number | undefined;
1343
- free(): void;
1365
+ childAtIndex(index: number): any;
1344
1366
  /**
1345
- * Returns the root value node.
1346
- * @returns The root value, or undefined if the document is empty
1347
- * @returns {Node | undefined}
1367
+ * Clears all children from the root node, leaving an empty document.
1348
1368
  */
1349
- value(): any;
1369
+ clearChildren(): void;
1350
1370
  /**
1351
1371
  * Returns the root value node, throwing if empty.
1352
1372
  * @returns The root value
@@ -1355,38 +1375,24 @@ export class RootNode {
1355
1375
  */
1356
1376
  valueOrThrow(): any;
1357
1377
  /**
1358
- * Returns the root value as an object if it is one.
1359
- * @returns The object, or undefined if root is not an object
1360
- * @returns {JsonObject | undefined}
1361
- */
1362
- asObject(): any;
1363
- /**
1364
- * Returns the root value as an object, throwing if it's not an object.
1365
- * @returns The object
1366
- * @throws If the root is not an object
1367
- * @returns {JsonObject}
1378
+ * Returns the previous sibling node.
1379
+ * @returns The previous sibling, or undefined if this is the first child
1380
+ * @returns {Node | undefined}
1368
1381
  */
1369
- asObjectOrThrow(): any;
1382
+ previousSibling(): any;
1370
1383
  /**
1371
- * Returns the root value as an object, creating an empty object if the root is empty.
1372
- * Returns undefined if the root contains a value of a different type.
1373
- * @returns The object, or undefined if a non-object value exists
1374
- * @returns {JsonObject | undefined}
1384
+ * Converts the CST back to a string representation.
1385
+ * @returns The JSONC string
1386
+ * @returns {string}
1375
1387
  */
1376
- asObjectOrCreate(): any;
1388
+ toString(): string;
1377
1389
  /**
1378
- * Returns the root value as an object, replacing any existing value with an empty object if needed.
1379
- * Unlike asObjectOrCreate, this always returns an object by replacing non-object values.
1380
- * @returns The object (always succeeds)
1381
- * @returns {JsonObject}
1382
- */
1383
- asObjectOrForce(): any;
1384
- /**
1385
- * Returns the root value as an array if it is one.
1386
- * @returns The array, or undefined if root is not an array
1387
- * @returns {JsonArray | undefined}
1390
+ * Returns the root value as an array, replacing any existing value with an empty array if needed.
1391
+ * Unlike asArrayOrCreate, this always returns an array by replacing non-array values.
1392
+ * @returns The array (always succeeds)
1393
+ * @returns {JsonArray}
1388
1394
  */
1389
- asArray(): any;
1395
+ asArrayOrForce(): any;
1390
1396
  /**
1391
1397
  * Returns the root value as an array, throwing if it's not an array.
1392
1398
  * @returns The array
@@ -1394,6 +1400,12 @@ export class RootNode {
1394
1400
  * @returns {JsonArray}
1395
1401
  */
1396
1402
  asArrayOrThrow(): any;
1403
+ /**
1404
+ * Returns all previous sibling nodes.
1405
+ * @returns Array of previous siblings
1406
+ * @returns {Node[]}
1407
+ */
1408
+ previousSiblings(): any[];
1397
1409
  /**
1398
1410
  * Returns the root value as an array, creating an empty array if the root is empty.
1399
1411
  * Returns undefined if the root contains a value of a different type.
@@ -1402,102 +1414,39 @@ export class RootNode {
1402
1414
  */
1403
1415
  asArrayOrCreate(): any;
1404
1416
  /**
1405
- * Returns the root value as an array, replacing any existing value with an empty array if needed.
1406
- * Unlike asArrayOrCreate, this always returns an array by replacing non-array values.
1407
- * @returns The array (always succeeds)
1408
- * @returns {JsonArray}
1409
- */
1410
- asArrayOrForce(): any;
1411
- /**
1412
- * Converts the CST back to a string representation.
1413
- * @returns The JSONC string
1414
- * @returns {string}
1415
- */
1416
- toString(): any;
1417
- /**
1418
- * Returns all child nodes including whitespace and punctuation.
1419
- * @returns Array of all child nodes
1420
- * @returns {Node[]}
1421
- */
1422
- children(): any[];
1423
- /**
1424
- * Sets the root value of the document.
1425
- * Accepts any JSON value: string, number, boolean, null, array, or object.
1426
- * @param value - The new value to set
1427
- * @param {any} value
1428
- */
1429
- setValue(value: any): void;
1430
- /**
1431
- * Configures whether trailing commas should be used throughout the document.
1432
- * When enabled, trailing commas are added for multiline formatting in objects and arrays.
1433
- * @param enabled - Whether to enable trailing commas
1434
- * @param {boolean} enabled
1435
- */
1436
- setTrailingCommas(enabled: boolean): void;
1437
- /**
1438
- * Clears all children from the root node, leaving an empty document.
1439
- */
1440
- clearChildren(): void;
1441
- /**
1442
- * Returns the indentation string used for a single level.
1443
- * @returns The single-level indentation string (e.g., " " or "\t")
1444
- * @returns {string | undefined}
1445
- */
1446
- singleIndentText(): any;
1447
- /**
1448
- * Returns the newline kind used in the document.
1449
- * @returns Either "\n" or "\r\n"
1450
- * @returns {string}
1451
- */
1452
- newlineKind(): any;
1453
- /**
1454
- * Returns the parent node in the CST.
1455
- * @returns The parent node, or undefined if this is the root
1456
- * @returns {Node | undefined}
1457
- */
1458
- parent(): any;
1459
- /**
1460
- * Returns the index of this node within its parent's children.
1461
- * @returns The child index
1462
- * @returns {number}
1463
- */
1464
- childIndex(): number;
1465
- /**
1466
- * Returns all ancestor nodes from parent to root.
1467
- * @returns Array of ancestor nodes
1468
- * @returns {Node[]}
1469
- */
1470
- ancestors(): any[];
1471
- /**
1472
- * Returns the previous sibling node.
1473
- * @returns The previous sibling, or undefined if this is the first child
1474
- * @returns {Node | undefined}
1417
+ * Returns the root value as an object, replacing any existing value with an empty object if needed.
1418
+ * Unlike asObjectOrCreate, this always returns an object by replacing non-object values.
1419
+ * @returns The object (always succeeds)
1420
+ * @returns {JsonObject}
1475
1421
  */
1476
- previousSibling(): any;
1422
+ asObjectOrForce(): any;
1477
1423
  /**
1478
- * Returns all previous sibling nodes.
1479
- * @returns Array of previous siblings
1480
- * @returns {Node[]}
1424
+ * Returns the root value as an object, throwing if it's not an object.
1425
+ * @returns The object
1426
+ * @throws If the root is not an object
1427
+ * @returns {JsonObject}
1481
1428
  */
1482
- previousSiblings(): any[];
1429
+ asObjectOrThrow(): any;
1483
1430
  /**
1484
- * Returns the next sibling node.
1485
- * @returns The next sibling, or undefined if this is the last child
1486
- * @returns {Node | undefined}
1431
+ * Returns the indentation string used for a single level.
1432
+ * @returns The single-level indentation string (e.g., " " or "\t")
1433
+ * @returns {string | undefined}
1487
1434
  */
1488
- nextSibling(): any;
1435
+ singleIndentText(): string | undefined;
1489
1436
  /**
1490
- * Returns all next sibling nodes.
1491
- * @returns Array of next siblings
1492
- * @returns {Node[]}
1437
+ * Returns the root value as an object, creating an empty object if the root is empty.
1438
+ * Returns undefined if the root contains a value of a different type.
1439
+ * @returns The object, or undefined if a non-object value exists
1440
+ * @returns {JsonObject | undefined}
1493
1441
  */
1494
- nextSiblings(): any[];
1442
+ asObjectOrCreate(): any;
1495
1443
  /**
1496
- * Returns the indentation string used at this node's depth.
1497
- * @returns The indentation string, or undefined if not applicable
1498
- * @returns {string | undefined}
1444
+ * Configures whether trailing commas should be used throughout the document.
1445
+ * When enabled, trailing commas are added for multiline formatting in objects and arrays.
1446
+ * @param enabled - Whether to enable trailing commas
1447
+ * @param {boolean} enabled
1499
1448
  */
1500
- indentText(): any;
1449
+ setTrailingCommas(enabled: boolean): void;
1501
1450
  /**
1502
1451
  * Returns whether this node's container uses trailing commas.
1503
1452
  * @returns true if trailing commas are used
@@ -1511,13 +1460,29 @@ export class RootNode {
1511
1460
  */
1512
1461
  childrenExcludeTriviaAndTokens(): any[];
1513
1462
  /**
1514
- * Returns the child node at the specified index.
1515
- * @param index - The child index
1516
- * @returns The child node, or undefined if index is out of bounds
1517
- * @param {number} index
1463
+ * Returns the root value node.
1464
+ * @returns The root value, or undefined if the document is empty
1518
1465
  * @returns {Node | undefined}
1519
1466
  */
1520
- childAtIndex(index: number): any;
1467
+ value(): any;
1468
+ /**
1469
+ * Returns the parent node in the CST.
1470
+ * @returns The parent node, or undefined if this is the root
1471
+ * @returns {Node | undefined}
1472
+ */
1473
+ parent(): any;
1474
+ /**
1475
+ * Returns the root value as an array if it is one.
1476
+ * @returns The array, or undefined if root is not an array
1477
+ * @returns {JsonArray | undefined}
1478
+ */
1479
+ asArray(): any;
1480
+ /**
1481
+ * Returns all child nodes including whitespace and punctuation.
1482
+ * @returns Array of all child nodes
1483
+ * @returns {Node[]}
1484
+ */
1485
+ children(): any[];
1521
1486
  /**
1522
1487
  * Converts the CST to a plain JavaScript value, similar to JSON.parse.
1523
1488
  * This recursively converts the root value to its JavaScript equivalent.
@@ -1527,6 +1492,25 @@ export class RootNode {
1527
1492
  * @returns {any}
1528
1493
  */
1529
1494
  toValue(): any;
1495
+ /**
1496
+ * Returns all ancestor nodes from parent to root.
1497
+ * @returns Array of ancestor nodes
1498
+ * @returns {Node[]}
1499
+ */
1500
+ ancestors(): any[];
1501
+ /**
1502
+ * Returns the root value as an object if it is one.
1503
+ * @returns The object, or undefined if root is not an object
1504
+ * @returns {JsonObject | undefined}
1505
+ */
1506
+ asObject(): any;
1507
+ /**
1508
+ * Sets the root value of the document.
1509
+ * Accepts any JSON value: string, number, boolean, null, array, or object.
1510
+ * @param value - The new value to set
1511
+ * @param {any} value
1512
+ */
1513
+ setValue(value: any): void;
1530
1514
  }
1531
1515
  /**
1532
1516
  * Represents a string literal node in the CST.
@@ -1538,23 +1522,23 @@ export class StringLit {
1538
1522
  __wbg_ptr: number | undefined;
1539
1523
  free(): void;
1540
1524
  /**
1541
- * Returns the decoded string value (without quotes and with escape sequences processed).
1542
- * @returns The decoded string value
1543
- * @returns {string}
1525
+ * Returns the index of this node within its parent's children.
1526
+ * @returns The child index
1527
+ * @returns {number}
1544
1528
  */
1545
- decodedValue(): any;
1529
+ childIndex(): number;
1546
1530
  /**
1547
- * Returns the raw string value including quotes and escape sequences.
1548
- * @returns The raw string representation
1549
- * @returns {string}
1531
+ * Returns the indentation string used at this node's depth.
1532
+ * @returns The indentation string, or undefined if not applicable
1533
+ * @returns {string | undefined}
1550
1534
  */
1551
- rawValue(): any;
1535
+ indentText(): string | undefined;
1552
1536
  /**
1553
- * Sets the raw string value (should include quotes).
1554
- * @param value - The new raw string value
1555
- * @param {string} value
1537
+ * Returns the next sibling node.
1538
+ * @returns The next sibling, or undefined if this is the last child
1539
+ * @returns {Node | undefined}
1556
1540
  */
1557
- setRawValue(value: string): void;
1541
+ nextSibling(): any;
1558
1542
  /**
1559
1543
  * Replaces this string literal with a new value.
1560
1544
  * @param replacement - The new value to replace this string with
@@ -1564,28 +1548,23 @@ export class StringLit {
1564
1548
  */
1565
1549
  replaceWith(replacement: any): any;
1566
1550
  /**
1567
- * Removes this string literal from its parent.
1568
- * After calling this method, the node is detached from the CST and can no longer be used.
1569
- */
1570
- remove(): void;
1571
- /**
1572
- * Returns the parent node in the CST.
1573
- * @returns The parent node, or undefined if this is the root
1574
- * @returns {Node | undefined}
1551
+ * Returns the decoded string value (without quotes and with escape sequences processed).
1552
+ * @returns The decoded string value
1553
+ * @returns {string}
1575
1554
  */
1576
- parent(): any;
1555
+ decodedValue(): string;
1577
1556
  /**
1578
- * Returns all ancestor nodes from parent to root.
1579
- * @returns Array of ancestor nodes
1557
+ * Returns all next sibling nodes.
1558
+ * @returns Array of next siblings
1580
1559
  * @returns {Node[]}
1581
1560
  */
1582
- ancestors(): any[];
1561
+ nextSiblings(): any[];
1583
1562
  /**
1584
- * Returns the index of this node within its parent's children.
1585
- * @returns The child index
1586
- * @returns {number}
1563
+ * Sets the raw string value (should include quotes).
1564
+ * @param value - The new raw string value
1565
+ * @param {string} value
1587
1566
  */
1588
- childIndex(): number;
1567
+ setRawValue(value: string): void;
1589
1568
  /**
1590
1569
  * Returns the previous sibling node.
1591
1570
  * @returns The previous sibling, or undefined if this is the first child
@@ -1599,35 +1578,40 @@ export class StringLit {
1599
1578
  */
1600
1579
  previousSiblings(): any[];
1601
1580
  /**
1602
- * Returns the next sibling node.
1603
- * @returns The next sibling, or undefined if this is the last child
1581
+ * Returns whether this node's container uses trailing commas.
1582
+ * @returns true if trailing commas are used
1583
+ * @returns {boolean}
1584
+ */
1585
+ usesTrailingCommas(): boolean;
1586
+ /**
1587
+ * Returns the parent node in the CST.
1588
+ * @returns The parent node, or undefined if this is the root
1604
1589
  * @returns {Node | undefined}
1605
1590
  */
1606
- nextSibling(): any;
1591
+ parent(): any;
1607
1592
  /**
1608
- * Returns all next sibling nodes.
1609
- * @returns Array of next siblings
1593
+ * Removes this string literal from its parent.
1594
+ * After calling this method, the node is detached from the CST and can no longer be used.
1595
+ */
1596
+ remove(): void;
1597
+ /**
1598
+ * Returns all ancestor nodes from parent to root.
1599
+ * @returns Array of ancestor nodes
1610
1600
  * @returns {Node[]}
1611
1601
  */
1612
- nextSiblings(): any[];
1602
+ ancestors(): any[];
1603
+ /**
1604
+ * Returns the raw string value including quotes and escape sequences.
1605
+ * @returns The raw string representation
1606
+ * @returns {string}
1607
+ */
1608
+ rawValue(): string;
1613
1609
  /**
1614
1610
  * Returns the root node of the document.
1615
1611
  * @returns The root node, or undefined if detached
1616
1612
  * @returns {RootNode | undefined}
1617
1613
  */
1618
1614
  rootNode(): any;
1619
- /**
1620
- * Returns the indentation string used at this node's depth.
1621
- * @returns The indentation string, or undefined if not applicable
1622
- * @returns {string | undefined}
1623
- */
1624
- indentText(): any;
1625
- /**
1626
- * Returns whether this node's container uses trailing commas.
1627
- * @returns true if trailing commas are used
1628
- * @returns {boolean}
1629
- */
1630
- usesTrailingCommas(): boolean;
1631
1615
  }
1632
1616
  /**
1633
1617
  * Represents an unquoted word literal node in the CST.
@@ -1639,18 +1623,23 @@ export class WordLit {
1639
1623
  __wbg_ptr: number | undefined;
1640
1624
  free(): void;
1641
1625
  /**
1642
- * Returns the unquoted word value.
1643
- * @returns The word literal as a string
1644
- * @returns {string}
1626
+ * Returns the index of this node within its parent's children.
1627
+ * @returns The child index
1628
+ * @returns {number}
1645
1629
  */
1646
- value(): any;
1630
+ childIndex(): number;
1647
1631
  /**
1648
- * Sets the raw word value.
1649
- * The value should be a valid unquoted identifier (alphanumeric and underscores).
1650
- * @param value - The raw word string to set
1651
- * @param {string} value
1632
+ * Returns the indentation string used at this node's depth.
1633
+ * @returns The indentation string, or undefined if not applicable
1634
+ * @returns {string | undefined}
1652
1635
  */
1653
- setRawValue(value: string): void;
1636
+ indentText(): string | undefined;
1637
+ /**
1638
+ * Returns the next sibling node.
1639
+ * @returns The next sibling, or undefined if this is the last child
1640
+ * @returns {Node | undefined}
1641
+ */
1642
+ nextSibling(): any;
1654
1643
  /**
1655
1644
  * Replaces this word literal with a new value.
1656
1645
  * @param replacement - The new value to replace this word with
@@ -1660,28 +1649,18 @@ export class WordLit {
1660
1649
  */
1661
1650
  replaceWith(replacement: any): any;
1662
1651
  /**
1663
- * Removes this node from its parent.
1664
- * After calling this method, the node is detached from the CST and can no longer be used.
1665
- */
1666
- remove(): void;
1667
- /**
1668
- * Returns the parent node in the CST.
1669
- * @returns The parent node, or undefined if this is the root
1670
- * @returns {Node | undefined}
1671
- */
1672
- parent(): any;
1673
- /**
1674
- * Returns all ancestor nodes from parent to root.
1675
- * @returns Array of ancestor nodes
1652
+ * Returns all next sibling nodes.
1653
+ * @returns Array of next siblings
1676
1654
  * @returns {Node[]}
1677
1655
  */
1678
- ancestors(): any[];
1656
+ nextSiblings(): any[];
1679
1657
  /**
1680
- * Returns the index of this node within its parent's children.
1681
- * @returns The child index
1682
- * @returns {number}
1658
+ * Sets the raw word value.
1659
+ * The value should be a valid unquoted identifier (alphanumeric and underscores).
1660
+ * @param value - The raw word string to set
1661
+ * @param {string} value
1683
1662
  */
1684
- childIndex(): number;
1663
+ setRawValue(value: string): void;
1685
1664
  /**
1686
1665
  * Returns the previous sibling node.
1687
1666
  * @returns The previous sibling, or undefined if this is the first child
@@ -1695,34 +1674,39 @@ export class WordLit {
1695
1674
  */
1696
1675
  previousSiblings(): any[];
1697
1676
  /**
1698
- * Returns the next sibling node.
1699
- * @returns The next sibling, or undefined if this is the last child
1677
+ * Returns whether this node's container uses trailing commas.
1678
+ * @returns true if trailing commas are used
1679
+ * @returns {boolean}
1680
+ */
1681
+ usesTrailingCommas(): boolean;
1682
+ /**
1683
+ * Returns the unquoted word value.
1684
+ * @returns The word literal as a string
1685
+ * @returns {string}
1686
+ */
1687
+ value(): string;
1688
+ /**
1689
+ * Returns the parent node in the CST.
1690
+ * @returns The parent node, or undefined if this is the root
1700
1691
  * @returns {Node | undefined}
1701
1692
  */
1702
- nextSibling(): any;
1693
+ parent(): any;
1703
1694
  /**
1704
- * Returns all next sibling nodes.
1705
- * @returns Array of next siblings
1695
+ * Removes this node from its parent.
1696
+ * After calling this method, the node is detached from the CST and can no longer be used.
1697
+ */
1698
+ remove(): void;
1699
+ /**
1700
+ * Returns all ancestor nodes from parent to root.
1701
+ * @returns Array of ancestor nodes
1706
1702
  * @returns {Node[]}
1707
1703
  */
1708
- nextSiblings(): any[];
1704
+ ancestors(): any[];
1709
1705
  /**
1710
1706
  * Returns the root node of the document.
1711
1707
  * @returns The root node, or undefined if detached
1712
1708
  * @returns {RootNode | undefined}
1713
1709
  */
1714
1710
  rootNode(): any;
1715
- /**
1716
- * Returns the indentation string used at this node's depth.
1717
- * @returns The indentation string, or undefined if not applicable
1718
- * @returns {string | undefined}
1719
- */
1720
- indentText(): any;
1721
- /**
1722
- * Returns whether this node's container uses trailing commas.
1723
- * @returns true if trailing commas are used
1724
- * @returns {boolean}
1725
- */
1726
- usesTrailingCommas(): boolean;
1727
1711
  }
1728
1712
  //# sourceMappingURL=rs_lib.internal.d.ts.map