We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c69201c commit e7f9eefCopy full SHA for e7f9eef
crates/oxc_ast/src/serialize/mod.rs
@@ -129,7 +129,13 @@ impl Program<'_> {
129
body: null,
130
sourceType: DESER[ModuleKind](POS_OFFSET.source_type.module_kind),
131
hashbang: null,
132
- ...(COMMENTS && { comments: DESER[Vec<Comment>](POS_OFFSET.comments) }),
+ ...(COMMENTS && {
133
+ get comments() {
134
+ const c = DESER[Vec<Comment>](POS_OFFSET.comments);
135
+ Object.defineProperty(this, 'comments', { value: c });
136
+ return c;
137
+ }
138
+ }),
139
start,
140
end,
141
...(RANGE && { range: [start, end] }),
0 commit comments