aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-06-30 23:23:47 +0200
committerlonkaars <loek@pipeframe.xyz>2023-06-30 23:23:47 +0200
commit8ff39cbe6300ca479584fe7d85ff03a1f65bc9b0 (patch)
treec354294dbbeb6c86d5909955762326272664f07b /api
parent722127ef4059020876f708b1d5406c04fd07b0da (diff)
WIP move more stuff around + more broken examples
Diffstat (limited to 'api')
-rw-r--r--api/sentence-word.ts10
-rw-r--r--api/sentence.ts3
-rw-r--r--api/word.ts4
3 files changed, 14 insertions, 3 deletions
diff --git a/api/sentence-word.ts b/api/sentence-word.ts
new file mode 100644
index 0000000..a5bb9ca
--- /dev/null
+++ b/api/sentence-word.ts
@@ -0,0 +1,10 @@
+import Word from "./word.ts";
+
+export default class SentenceWord extends Word {
+ public indexStart: number = 0;
+ public indexEnd: number = 0;
+
+ constructor() {
+ super();
+ }
+}
diff --git a/api/sentence.ts b/api/sentence.ts
index dc14cb2..6f67844 100644
--- a/api/sentence.ts
+++ b/api/sentence.ts
@@ -1,9 +1,10 @@
import APIBase from "./base.ts";
+import SentenceWord from "./sentence-word.ts";
import Word from "./word.ts";
import Yomikun from "./yomikun.ts";
export default class Sentence extends APIBase {
- public words: Array<Word> = [];
+ public words: Array<SentenceWord> = [];
constructor() {
super();
diff --git a/api/word.ts b/api/word.ts
index d2df69e..3e8fce6 100644
--- a/api/word.ts
+++ b/api/word.ts
@@ -2,8 +2,8 @@ import Glossary from "./glossary.ts";
import APIBase from "./base.ts";
export default class Word extends APIBase {
- public writing: string = "TODO";
- public reading: string = "TODO";
+ public writing = "TODO";
+ public reading = "TODO";
constructor() {
super();