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.
toJSON
WordImpl
1 parent 0b0ed9d commit 799c830Copy full SHA for 799c830
1 file changed
src/word.ts
@@ -64,4 +64,8 @@ export class WordImpl implements Word {
64
set parts(v: WordPart[] | undefined) {
65
this.#parts = v ?? undefined;
66
}
67
+
68
+ toJSON() {
69
+ return { text: this.text, pos: this.pos, end: this.end, parts: this.parts, value: this.value };
70
+ }
71
0 commit comments